#AB31B2#AB31B2

#AB31B2 is a mid, highly saturated purple. Relative luminance 0.141; OKLCH L 54.8% C 0.213 H 325.6°. Best body text is #FFFFFF at 5.51:1 contrast (WCAG AA passes).

Color values

HEX#AB31B2
RGBrgb(171, 49, 178)
HSLhsl(297, 57%, 45%)
HSVhsv(297, 72%, 70%)
CMYKcmyk(3.9%, 72.5%, 0%, 30.2%)
CIE-LABlab(44.33, 64.22, -43.23)
CIE-LCHlch(44.33, 77.41, 326.05°)
OKLaboklab(54.81% 0.1758 -0.1202)
OKLCHoklch(54.81% 0.213 325.6)
XYZxyz(25.9282, 14.0706, 43.4611)
Luminance0.1407 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AB31B2 #38B231
analogous
#6B31B2 #AB31B2 #B23179
triadic
#AB31B2 #B2AB31 #31B2AB
tetradic
#AB31B2 #B26B31 #38B231 #3179B2
square
#AB31B2 #B26B31 #38B231 #3179B2
split-complementary
#AB31B2 #79B231 #31B26B
monochromatic
#4F1752 #7D2482 #AB31B2 #C851CF #D781DC

Accessibility & contrast

On white

5.51
#AB31B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.81
#AB31B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AB31B2
5.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AB31B2#FFFFFF#000000##FFFFFF
##AB31B21.005.513.815.51
#FFFFFF5.511.0021.001.00
#0000003.8121.001.0021.00
##FFFFFF5.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0A5FB6
Deuteranopia (green-blind)
#4D6EAF
Tritanopia (blue-blind)
#AF476F
Achromatopsia (no color)
#696969

Design tokens & code

CSS
--color: #ab31b2;
/* rgb */ color: rgb(171, 49, 178);
/* oklch */ color: oklch(54.8% 0.213 325.6);
Tailwind
colors: {
  custom: {
    50: '#c875c9',
    500: '#ab31b2',
    950: '#000000',
  },
}
SCSS
$custom: #ab31b2;
$custom-light: #c875c9;
$custom-dark: #000000;
JSON
{
  "hex": "#ab31b2",
  "rgb": {
    "r": 171,
    "g": 49,
    "b": 178
  },
  "hsl": {
    "h": 296.744,
    "s": 56.828,
    "l": 44.51
  },
  "oklch": {
    "l": 0.54806,
    "c": 0.21294,
    "h": 325.6
  },
  "luminance": 0.14069
}

Semantic roles & 50–950 ramp

primary
#AB31B2
secondary
#7DC579
accent
#E04850
background
#FCF7FC
surface
#F9EEF8
border
#D2C9D1
text
#140913
muted
#827B82

Preview Lab

Preview with #AB31B2

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

Preview Lab → · Contrast checker → · Palette generator →

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