#AB42E2#AB42E2

#AB42E2 is a mid, highly saturated violet. Relative luminance 0.180; OKLCH L 59.5% C 0.236 H 311.3°. Best body text is #000000 at 4.61:1 contrast (WCAG AA passes).

Color values

HEX#AB42E2
RGBrgb(171, 66, 226)
HSLhsl(279, 73%, 57%)
HSVhsv(279, 71%, 89%)
CMYKcmyk(24.3%, 70.8%, 0%, 11.4%)
CIE-LABlab(49.55, 66.97, -62.59)
CIE-LCHlch(49.55, 91.67, 316.94°)
OKLaboklab(59.48% 0.1553 -0.177)
OKLCHoklch(59.48% 0.236 311.3)
XYZxyz(32.4677, 18.0462, 73.7097)
Luminance0.1804 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AB42E2 #79E242
analogous
#5B42E2 #AB42E2 #E242C9
triadic
#AB42E2 #E2AB42 #42E2AB
tetradic
#AB42E2 #E25B42 #79E242 #42C9E2
square
#AB42E2 #E25B42 #79E242 #42C9E2
split-complementary
#AB42E2 #C9E242 #42E25B
monochromatic
#681793 #8E1FC8 #AB42E2 #C377EA #DAACF2

Accessibility & contrast

On white

4.56
#AB42E2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.61
#AB42E2 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AB42E2
4.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AB42E2#FFFFFF#000000##000000
##AB42E21.004.564.614.61
#FFFFFF4.561.0021.0021.00
#0000004.6121.001.001.00
##0000004.6121.001.001.00

Color blindness preview

Protanopia (red-blind)
#0071E7
Deuteranopia (green-blind)
#2A78DF
Tritanopia (blue-blind)
#A4658E
Achromatopsia (no color)
#767676

Design tokens & code

CSS
--color: #ab42e2;
/* rgb */ color: rgb(171, 66, 226);
/* oklch */ color: oklch(59.5% 0.236 311.3);
Tailwind
colors: {
  custom: {
    50: '#c97fec',
    500: '#ab42e2',
    950: '#000000',
  },
}
SCSS
$custom: #ab42e2;
$custom-light: #c97fec;
$custom-dark: #000000;
JSON
{
  "hex": "#ab42e2",
  "rgb": {
    "r": 171,
    "g": 66,
    "b": 226
  },
  "hsl": {
    "h": 279.375,
    "s": 73.394,
    "l": 57.255
  },
  "oklch": {
    "l": 0.59479,
    "c": 0.23551,
    "h": 311.3
  },
  "luminance": 0.18045
}

Semantic roles & 50–950 ramp

primary
#AB42E2
secondary
#B6E09F
accent
#F03877
background
#FCF8FE
surface
#F9EFFD
border
#D2CAD5
text
#140B16
muted
#827C84

Preview Lab

Preview with #AB42E2

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

Preview Lab → · Contrast checker → · Palette generator →

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