#AF51DB#AF51DB

#AF51DB is a mid, highly saturated purple. Relative luminance 0.201; OKLCH L 61.2% C 0.211 H 313.3°. Best body text is #000000 at 5.02:1 contrast (WCAG AA passes).

Color values

HEX#AF51DB
RGBrgb(175, 81, 219)
HSLhsl(281, 66%, 59%)
HSVhsv(281, 63%, 86%)
CMYKcmyk(20.1%, 63%, 0%, 14.1%)
CIE-LABlab(51.97, 59.90, -54.71)
CIE-LCHlch(51.97, 81.12, 317.59°)
OKLaboklab(61.18% 0.1449 -0.1538)
OKLCHoklch(61.18% 0.211 313.3)
XYZxyz(33.4056, 20.1143, 69.1268)
Luminance0.2011 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF51DB #7DDB51
analogous
#6A51DB #AF51DB #DB51C2
triadic
#AF51DB #DBAF51 #51DBAF
tetradic
#AF51DB #DB6A51 #7DDB51 #51C2DB
square
#AF51DB #DB6A51 #7DDB51 #51C2DB
split-complementary
#AF51DB #C2DB51 #51DB6A
monochromatic
#6E1E93 #9429C6 #AF51DB #C684E5 #DEB6F0

Accessibility & contrast

On white

4.18
#AF51DB on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

5.02
#AF51DB on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AF51DB
5.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF51DB#FFFFFF#000000##000000
##AF51DB1.004.185.025.02
#FFFFFF4.181.0021.0021.00
#0000005.0221.001.001.00
##0000005.0221.001.001.00

Color blindness preview

Protanopia (red-blind)
#1477DF
Deuteranopia (green-blind)
#497ED8
Tritanopia (blue-blind)
#AB6B8F
Achromatopsia (no color)
#7C7C7C

Design tokens & code

CSS
--color: #af51db;
/* rgb */ color: rgb(175, 81, 219);
/* oklch */ color: oklch(61.2% 0.211 313.3);
Tailwind
colors: {
  custom: {
    50: '#ca87e7',
    500: '#af51db',
    950: '#000000',
  },
}
SCSS
$custom: #af51db;
$custom-light: #ca87e7;
$custom-dark: #000000;
JSON
{
  "hex": "#af51db",
  "rgb": {
    "r": 175,
    "g": 81,
    "b": 219
  },
  "hsl": {
    "h": 280.87,
    "s": 65.714,
    "l": 58.824
  },
  "oklch": {
    "l": 0.61181,
    "c": 0.21131,
    "h": 313.3
  },
  "luminance": 0.20113
}

Semantic roles & 50–950 ramp

primary
#AF51DB
secondary
#BADFA9
accent
#E93F75
background
#FCF8FE
surface
#F9F0FC
border
#D2CBD5
text
#140C16
muted
#827D84

Preview Lab

Preview with #AF51DB

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

Preview Lab → · Contrast checker → · Palette generator →

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