#AF51CC#AF51CC

#AF51CC is a mid, vivid purple. Relative luminance 0.194; OKLCH L 60.3% C 0.197 H 317.5°. Best body text is #000000 at 4.87:1 contrast (WCAG AA passes).

Color values

HEX#AF51CC
RGBrgb(175, 81, 204)
HSLhsl(286, 55%, 56%)
HSVhsv(286, 60%, 80%)
CMYKcmyk(14.2%, 60.3%, 0%, 20%)
CIE-LABlab(51.11, 56.84, -47.53)
CIE-LCHlch(51.11, 74.09, 320.10°)
OKLaboklab(60.28% 0.1449 -0.1328)
OKLCHoklch(60.28% 0.197 317.5)
XYZxyz(31.5192, 19.3597, 59.1915)
Luminance0.1936 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF51CC #6ECC51
analogous
#7151CC #AF51CC #CC51AB
triadic
#AF51CC #CCAF51 #51CCAF
tetradic
#AF51CC #CC7151 #6ECC51 #51ABCC
square
#AF51CC #CC7151 #6ECC51 #51ABCC
split-complementary
#AF51CC #ABCC51 #51CC71
monochromatic
#69257E #9033AD #AF51CC #C580DA #DBB0E8

Accessibility & contrast

On white

4.31
#AF51CC on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.87
#AF51CC on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AF51CC
4.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF51CC#FFFFFF#000000##000000
##AF51CC1.004.314.874.87
#FFFFFF4.311.0021.0021.00
#0000004.8721.001.001.00
##0000004.8721.001.001.00

Color blindness preview

Protanopia (red-blind)
#2F74D0
Deuteranopia (green-blind)
#557DC9
Tritanopia (blue-blind)
#AE6687
Achromatopsia (no color)
#7A7A7A

Design tokens & code

CSS
--color: #af51cc;
/* rgb */ color: rgb(175, 81, 204);
/* oklch */ color: oklch(60.3% 0.197 317.5);
Tailwind
colors: {
  custom: {
    50: '#ca87dc',
    500: '#af51cc',
    950: '#000000',
  },
}
SCSS
$custom: #af51cc;
$custom-light: #ca87dc;
$custom-dark: #000000;
JSON
{
  "hex": "#af51cc",
  "rgb": {
    "r": 175,
    "g": 81,
    "b": 204
  },
  "hsl": {
    "h": 285.854,
    "s": 54.667,
    "l": 55.882
  },
  "oklch": {
    "l": 0.6028,
    "c": 0.19658,
    "h": 317.5
  },
  "luminance": 0.19358
}

Semantic roles & 50–950 ramp

primary
#AF51CC
secondary
#AFD6A3
accent
#DE4A6D
background
#FCF8FD
surface
#F9F0FB
border
#D2CBD4
text
#140C15
muted
#827D83

Preview Lab

Preview with #AF51CC

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

Preview Lab → · Contrast checker → · Palette generator →

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