#AB40CB#AB40CB

#AB40CB is a mid, highly saturated purple. Relative luminance 0.166; OKLCH L 57.8% C 0.217 H 317.4°. Best body text is #FFFFFF at 4.85:1 contrast (WCAG AA passes).

Color values

HEX#AB40CB
RGBrgb(171, 64, 203)
HSLhsl(286, 57%, 52%)
HSVhsv(286, 68%, 80%)
CMYKcmyk(15.8%, 68.5%, 0%, 20.4%)
CIE-LABlab(47.80, 63.17, -52.27)
CIE-LCHlch(47.80, 81.99, 320.40°)
OKLaboklab(57.76% 0.1596 -0.1467)
OKLCHoklch(57.76% 0.217 317.4)
XYZxyz(29.4059, 16.6377, 58.1508)
Luminance0.1664 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AB40CB #60CB40
analogous
#6540CB #AB40CB #CB40A6
triadic
#AB40CB #CBAB40 #40CBAB
tetradic
#AB40CB #CB6540 #60CB40 #40A6CB
square
#AB40CB #CB6540 #60CB40 #40A6CB
split-complementary
#AB40CB #A6CB40 #40CB65
monochromatic
#5F1F72 #872CA2 #AB40CB #C070D8 #D5A0E5

Accessibility & contrast

On white

4.85
#AB40CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.33
#AB40CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AB40CB
4.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AB40CB#FFFFFF#000000##FFFFFF
##AB40CB1.004.854.334.85
#FFFFFF4.851.0021.001.00
#0000004.3321.001.0021.00
##FFFFFF4.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BCF
Deuteranopia (green-blind)
#4475C8
Tritanopia (blue-blind)
#AA5B81
Achromatopsia (no color)
#717171

Design tokens & code

CSS
--color: #ab40cb;
/* rgb */ color: rgb(171, 64, 203);
/* oklch */ color: oklch(57.8% 0.217 317.4);
Tailwind
colors: {
  custom: {
    50: '#c87ddb',
    500: '#ab40cb',
    950: '#000000',
  },
}
SCSS
$custom: #ab40cb;
$custom-light: #c87ddb;
$custom-dark: #000000;
JSON
{
  "hex": "#ab40cb",
  "rgb": {
    "r": 171,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 286.187,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.57762,
    "c": 0.21676,
    "h": 317.4
  },
  "luminance": 0.16637
}

Semantic roles & 50–950 ramp

primary
#AB40CB
secondary
#A3D295
accent
#E0476B
background
#FCF8FD
surface
#F9EFFB
border
#D2CAD4
text
#140A15
muted
#827C83

Preview Lab

Preview with #AB40CB

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#AB40CB Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva