#AB31D4#AB31D4

#AB31D4 is a mid, highly saturated purple. Relative luminance 0.156; OKLCH L 57.0% C 0.241 H 315.8°. Best body text is #FFFFFF at 5.10:1 contrast (WCAG AA passes).

Color values

HEX#AB31D4
RGBrgb(171, 49, 212)
HSLhsl(285, 65%, 51%)
HSVhsv(285, 77%, 83%)
CMYKcmyk(19.3%, 76.9%, 0%, 16.9%)
CIE-LABlab(46.46, 70.36, -59.60)
CIE-LCHlch(46.46, 92.22, 319.73°)
OKLaboklab(56.99% 0.1726 -0.1681)
OKLCHoklch(56.99% 0.241 315.8)
XYZxyz(29.7747, 15.6092, 63.7191)
Luminance0.1561 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AB31D4 #5AD431
analogous
#5931D4 #AB31D4 #D431AB
triadic
#AB31D4 #D4AB31 #31D4AB
tetradic
#AB31D4 #D45931 #5AD431 #31ABD4
square
#AB31D4 #D45931 #5AD431 #31ABD4
split-complementary
#AB31D4 #ABD431 #31D459
monochromatic
#5C1873 #8423A5 #AB31D4 #C064DF #D496E9

Accessibility & contrast

On white

5.10
#AB31D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.12
#AB31D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AB31D4
5.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AB31D4#FFFFFF#000000##FFFFFF
##AB31D41.005.104.125.10
#FFFFFF5.101.0021.001.00
#0000004.1221.001.0021.00
##FFFFFF5.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0067D8
Deuteranopia (green-blind)
#2D71D1
Tritanopia (blue-blind)
#A85682
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #ab31d4;
/* rgb */ color: rgb(171, 49, 212);
/* oklch */ color: oklch(57.0% 0.241 315.8);
Tailwind
colors: {
  custom: {
    50: '#c977e2',
    500: '#ab31d4',
    950: '#000000',
  },
}
SCSS
$custom: #ab31d4;
$custom-light: #c977e2;
$custom-dark: #000000;
JSON
{
  "hex": "#ab31d4",
  "rgb": {
    "r": 171,
    "g": 49,
    "b": 212
  },
  "hsl": {
    "h": 284.908,
    "s": 65.462,
    "l": 51.176
  },
  "oklch": {
    "l": 0.56991,
    "c": 0.24095,
    "h": 315.8
  },
  "luminance": 0.15608
}

Semantic roles & 50–950 ramp

primary
#AB31D4
secondary
#9FD48C
accent
#E83F6A
background
#FCF7FD
surface
#F9EEFB
border
#D2C9D4
text
#140A15
muted
#827C83

Preview Lab

Preview with #AB31D4

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

Preview Lab → · Contrast checker → · Palette generator →

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