#AF31D4#AF31D4

#AF31D4 is a mid, highly saturated purple. Relative luminance 0.161; OKLCH L 57.5% C 0.242 H 317.1°. Best body text is #FFFFFF at 4.98:1 contrast (WCAG AA passes).

Color values

HEX#AF31D4
RGBrgb(175, 49, 212)
HSLhsl(286, 65%, 51%)
HSVhsv(286, 77%, 83%)
CMYKcmyk(17.5%, 76.9%, 0%, 16.9%)
CIE-LABlab(47.06, 71.10, -58.60)
CIE-LCHlch(47.06, 92.14, 320.50°)
OKLaboklab(57.54% 0.1774 -0.165)
OKLCHoklch(57.54% 0.242 317.1)
XYZxyz(30.6594, 16.0654, 63.7605)
Luminance0.1606 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF31D4 #56D431
analogous
#5D31D4 #AF31D4 #D431A8
triadic
#AF31D4 #D4AF31 #31D4AF
tetradic
#AF31D4 #D45D31 #56D431 #31A8D4
square
#AF31D4 #D45D31 #56D431 #31A8D4
split-complementary
#AF31D4 #A8D431 #31D45D
monochromatic
#5E1873 #8823A5 #AF31D4 #C364DF #D696E9

Accessibility & contrast

On white

4.98
#AF31D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.21
#AF31D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF31D4
4.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF31D4#FFFFFF#000000##FFFFFF
##AF31D41.004.984.214.98
#FFFFFF4.981.0021.001.00
#0000004.2121.001.0021.00
##FFFFFF4.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0068D8
Deuteranopia (green-blind)
#3473D0
Tritanopia (blue-blind)
#AD5682
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #af31d4;
/* rgb */ color: rgb(175, 49, 212);
/* oklch */ color: oklch(57.5% 0.242 317.1);
Tailwind
colors: {
  custom: {
    50: '#cb77e2',
    500: '#af31d4',
    950: '#000000',
  },
}
SCSS
$custom: #af31d4;
$custom-light: #cb77e2;
$custom-dark: #000000;
JSON
{
  "hex": "#af31d4",
  "rgb": {
    "r": 175,
    "g": 49,
    "b": 212
  },
  "hsl": {
    "h": 286.38,
    "s": 65.462,
    "l": 51.176
  },
  "oklch": {
    "l": 0.57537,
    "c": 0.24233,
    "h": 317.1
  },
  "luminance": 0.16064
}

Semantic roles & 50–950 ramp

primary
#AF31D4
secondary
#9DD48C
accent
#E83F66
background
#FDF7FD
surface
#FAEEFB
border
#D3C9D4
text
#140A15
muted
#837C83

Preview Lab

Preview with #AF31D4

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

Preview Lab → · Contrast checker → · Palette generator →

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