#AF51CB#AF51CB

#AF51CB is a mid, vivid purple. Relative luminance 0.193; OKLCH L 60.2% C 0.196 H 317.8°. Best body text is #000000 at 4.86:1 contrast (WCAG AA passes).

Color values

HEX#AF51CB
RGBrgb(175, 81, 203)
HSLhsl(286, 54%, 56%)
HSVhsv(286, 60%, 80%)
CMYKcmyk(13.8%, 60.1%, 0%, 20.4%)
CIE-LABlab(51.05, 56.64, -47.04)
CIE-LCHlch(51.05, 73.63, 320.29°)
OKLaboklab(60.22% 0.1449 -0.1314)
OKLCHoklch(60.22% 0.196 317.8)
XYZxyz(31.3996, 19.3119, 58.5619)
Luminance0.1931 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF51CB #6DCB51
analogous
#7251CB #AF51CB #CB51AA
triadic
#AF51CB #CBAF51 #51CBAF
tetradic
#AF51CB #CB7251 #6DCB51 #51AACB
square
#AF51CB #CB7251 #6DCB51 #51AACB
split-complementary
#AF51CB #AACB51 #51CB72
monochromatic
#68257C #9033AC #AF51CB #C580D9 #DAAFE7

Accessibility & contrast

On white

4.32
#AF51CB on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.86
#AF51CB on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AF51CB
4.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF51CB#FFFFFF#000000##000000
##AF51CB1.004.324.864.86
#FFFFFF4.321.0021.0021.00
#0000004.8621.001.001.00
##0000004.8621.001.001.00

Color blindness preview

Protanopia (red-blind)
#3073CF
Deuteranopia (green-blind)
#567DC8
Tritanopia (blue-blind)
#AE6587
Achromatopsia (no color)
#7A7A7A

Design tokens & code

CSS
--color: #af51cb;
/* rgb */ color: rgb(175, 81, 203);
/* oklch */ color: oklch(60.2% 0.196 317.8);
Tailwind
colors: {
  custom: {
    50: '#ca87db',
    500: '#af51cb',
    950: '#000000',
  },
}
SCSS
$custom: #af51cb;
$custom-light: #ca87db;
$custom-dark: #000000;
JSON
{
  "hex": "#af51cb",
  "rgb": {
    "r": 175,
    "g": 81,
    "b": 203
  },
  "hsl": {
    "h": 286.23,
    "s": 53.982,
    "l": 55.686
  },
  "oklch": {
    "l": 0.60222,
    "c": 0.19561,
    "h": 317.8
  },
  "luminance": 0.19311
}

Semantic roles & 50–950 ramp

primary
#AF51CB
secondary
#AED5A3
accent
#DD4A6C
background
#FCF8FD
surface
#F9F0FB
border
#D2CBD4
text
#140C15
muted
#827D83

Preview Lab

Preview with #AF51CB

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

Preview Lab → · Contrast checker → · Palette generator →

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