#AF51DC#AF51DC

#AF51DC is a mid, highly saturated purple. Relative luminance 0.202; OKLCH L 61.2% C 0.212 H 313.0°. Best body text is #000000 at 5.03:1 contrast (WCAG AA passes).

Color values

HEX#AF51DC
RGBrgb(175, 81, 220)
HSLhsl(281, 67%, 59%)
HSVhsv(281, 63%, 86%)
CMYKcmyk(20.5%, 63.2%, 0%, 13.7%)
CIE-LABlab(52.03, 60.11, -55.18)
CIE-LCHlch(52.03, 81.60, 317.45°)
OKLaboklab(61.24% 0.1448 -0.1552)
OKLCHoklch(61.24% 0.212 313)
XYZxyz(33.5376, 20.1671, 69.8222)
Luminance0.2017 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF51DC #7EDC51
analogous
#6A51DC #AF51DC #DC51C3
triadic
#AF51DC #DCAF51 #51DCAF
tetradic
#AF51DC #DC6A51 #7EDC51 #51C3DC
square
#AF51DC #DC6A51 #7EDC51 #51C3DC
split-complementary
#AF51DC #C3DC51 #51DC6A
monochromatic
#6E1E95 #9428C8 #AF51DC #C684E6 #DEB7F0

Accessibility & contrast

On white

4.17
#AF51DC on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

5.03
#AF51DC on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AF51DC
5.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF51DC#FFFFFF#000000##000000
##AF51DC1.004.175.035.03
#FFFFFF4.171.0021.0021.00
#0000005.0321.001.001.00
##0000005.0321.001.001.00

Color blindness preview

Protanopia (red-blind)
#1077E0
Deuteranopia (green-blind)
#487ED9
Tritanopia (blue-blind)
#AA6C8F
Achromatopsia (no color)
#7C7C7C

Design tokens & code

CSS
--color: #af51dc;
/* rgb */ color: rgb(175, 81, 220);
/* oklch */ color: oklch(61.2% 0.212 313.0);
Tailwind
colors: {
  custom: {
    50: '#ca87e7',
    500: '#af51dc',
    950: '#000000',
  },
}
SCSS
$custom: #af51dc;
$custom-light: #ca87e7;
$custom-dark: #000000;
JSON
{
  "hex": "#af51dc",
  "rgb": {
    "r": 175,
    "g": 81,
    "b": 220
  },
  "hsl": {
    "h": 280.576,
    "s": 66.507,
    "l": 59.02
  },
  "oklch": {
    "l": 0.61243,
    "c": 0.2123,
    "h": 313
  },
  "luminance": 0.20166
}

Semantic roles & 50–950 ramp

primary
#AF51DC
secondary
#BBE0A9
accent
#E93E76
background
#FCF8FE
surface
#F9F0FD
border
#D2CBD5
text
#140C16
muted
#827D84

Preview Lab

Preview with #AF51DC

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

Preview Lab → · Contrast checker → · Palette generator →

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