#AF51D8#AF51D8

#AF51D8 is a mid, highly saturated purple. Relative luminance 0.200; OKLCH L 61.0% C 0.208 H 314.1°. Best body text is #000000 at 4.99:1 contrast (WCAG AA passes).

Color values

HEX#AF51D8
RGBrgb(175, 81, 216)
HSLhsl(282, 63%, 58%)
HSVhsv(282, 63%, 85%)
CMYKcmyk(19%, 62.5%, 0%, 15.3%)
CIE-LABlab(51.79, 59.28, -53.29)
CIE-LCHlch(51.79, 79.71, 318.04°)
OKLaboklab(61% 0.1449 -0.1497)
OKLCHoklch(61% 0.208 314.1)
XYZxyz(33.0142, 19.9577, 67.0656)
Luminance0.1996 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF51D8 #7AD851
analogous
#6B51D8 #AF51D8 #D851BD
triadic
#AF51D8 #D8AF51 #51D8AF
tetradic
#AF51D8 #D86B51 #7AD851 #51BDD8
square
#AF51D8 #D86B51 #7AD851 #51BDD8
split-complementary
#AF51D8 #BDD851 #51D86B
monochromatic
#6D208F #932BC1 #AF51D8 #C683E3 #DDB5EE

Accessibility & contrast

On white

4.21
#AF51D8 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.99
#AF51D8 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AF51D8
4.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF51D8#FFFFFF#000000##000000
##AF51D81.004.214.994.99
#FFFFFF4.211.0021.0021.00
#0000004.9921.001.001.00
##0000004.9921.001.001.00

Color blindness preview

Protanopia (red-blind)
#1B76DC
Deuteranopia (green-blind)
#4C7ED5
Tritanopia (blue-blind)
#AB6A8D
Achromatopsia (no color)
#7B7B7B

Design tokens & code

CSS
--color: #af51d8;
/* rgb */ color: rgb(175, 81, 216);
/* oklch */ color: oklch(61.0% 0.208 314.1);
Tailwind
colors: {
  custom: {
    50: '#ca87e5',
    500: '#af51d8',
    950: '#000000',
  },
}
SCSS
$custom: #af51d8;
$custom-light: #ca87e5;
$custom-dark: #000000;
JSON
{
  "hex": "#af51d8",
  "rgb": {
    "r": 175,
    "g": 81,
    "b": 216
  },
  "hsl": {
    "h": 281.778,
    "s": 63.38,
    "l": 58.235
  },
  "oklch": {
    "l": 0.60997,
    "c": 0.20835,
    "h": 314.1
  },
  "luminance": 0.19957
}

Semantic roles & 50–950 ramp

primary
#AF51D8
secondary
#B8DDA8
accent
#E64174
background
#FCF8FE
surface
#F9F0FC
border
#D2CBD5
text
#140C16
muted
#827D84

Preview Lab

Preview with #AF51D8

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

Preview Lab → · Contrast checker → · Palette generator →

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