#AF31DC#AF31DC

#AF31DC is a mid, highly saturated purple. Relative luminance 0.165; OKLCH L 58.1% C 0.249 H 315.0°. Best body text is #FFFFFF at 4.89:1 contrast (WCAG AA passes).

Color values

HEX#AF31DC
RGBrgb(175, 49, 220)
HSLhsl(284, 71%, 53%)
HSVhsv(284, 78%, 86%)
CMYKcmyk(20.5%, 77.7%, 0%, 13.7%)
CIE-LABlab(47.60, 72.60, -62.31)
CIE-LCHlch(47.60, 95.67, 319.36°)
OKLaboklab(58.09% 0.1762 -0.1759)
OKLCHoklch(58.09% 0.249 315)
XYZxyz(31.6936, 16.4791, 69.2076)
Luminance0.1648 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF31DC #5EDC31
analogous
#5A31DC #AF31DC #DC31B3
triadic
#AF31DC #DCAF31 #31DCAF
tetradic
#AF31DC #DC5A31 #5EDC31 #31B3DC
square
#AF31DC #DC5A31 #5EDC31 #31B3DC
split-complementary
#AF31DC #B3DC31 #31DC5A
monochromatic
#62157D #8B1EB2 #AF31DC #C365E5 #D89AEE

Accessibility & contrast

On white

4.89
#AF31DC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.30
#AF31DC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF31DC
4.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF31DC#FFFFFF#000000##FFFFFF
##AF31DC1.004.894.304.89
#FFFFFF4.891.0021.001.00
#0000004.3021.001.0021.00
##FFFFFF4.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006AE1
Deuteranopia (green-blind)
#2774D8
Tritanopia (blue-blind)
#AB5987
Achromatopsia (no color)
#717171

Design tokens & code

CSS
--color: #af31dc;
/* rgb */ color: rgb(175, 49, 220);
/* oklch */ color: oklch(58.1% 0.249 315.0);
Tailwind
colors: {
  custom: {
    50: '#cc78e8',
    500: '#af31dc',
    950: '#000000',
  },
}
SCSS
$custom: #af31dc;
$custom-light: #cc78e8;
$custom-dark: #000000;
JSON
{
  "hex": "#af31dc",
  "rgb": {
    "r": 175,
    "g": 49,
    "b": 220
  },
  "hsl": {
    "h": 284.211,
    "s": 70.954,
    "l": 52.745
  },
  "oklch": {
    "l": 0.58085,
    "c": 0.24898,
    "h": 315
  },
  "luminance": 0.16478
}

Semantic roles & 50–950 ramp

primary
#AF31DC
secondary
#A3D98F
accent
#EE3A69
background
#FDF7FE
surface
#FAEEFD
border
#D3C9D5
text
#140A16
muted
#837C84

Preview Lab

Preview with #AF31DC

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

Preview Lab → · Contrast checker → · Palette generator →

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