#9872EB#9872EB

#9872EB is a light, vivid violet. Relative luminance 0.247; OKLCH L 64.4% C 0.176 H 295.5°. Best body text is #000000 at 5.94:1 contrast (WCAG AA passes).

Color values

HEX#9872EB
RGBrgb(152, 114, 235)
HSLhsl(259, 75%, 68%)
HSVhsv(259, 51%, 92%)
CMYKcmyk(35.3%, 51.5%, 0%, 7.8%)
CIE-LABlab(56.79, 41.04, -56.14)
CIE-LCHlch(56.79, 69.54, 306.17°)
OKLaboklab(64.44% 0.0758 -0.1588)
OKLCHoklch(64.44% 0.176 295.5)
XYZxyz(33.9578, 24.7076, 81.5611)
Luminance0.2471 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9872EB #C5EB72
analogous
#7288EB #9872EB #D472EB
triadic
#9872EB #EB9872 #72EB98
tetradic
#9872EB #EB7288 #C5EB72 #72EBD4
square
#9872EB #EB7288 #C5EB72 #72EBD4
split-complementary
#9872EB #EBD472 #88EB72
monochromatic
#521CC6 #713CE3 #9872EB #BFA8F3 #E6DDFA

Accessibility & contrast

On white

3.53
#9872EB on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

5.94
#9872EB on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #9872EB
5.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9872EB#FFFFFF#000000##000000
##9872EB1.003.535.945.94
#FFFFFF3.531.0021.0021.00
#0000005.9421.001.001.00
##0000005.9421.001.001.00

Color blindness preview

Protanopia (red-blind)
#4289EF
Deuteranopia (green-blind)
#4B87E8
Tritanopia (blue-blind)
#858AA4
Achromatopsia (no color)
#888888

Design tokens & code

CSS
--color: #9872eb;
/* rgb */ color: rgb(152, 114, 235);
/* oklch */ color: oklch(64.4% 0.176 295.5);
Tailwind
colors: {
  custom: {
    50: '#ba9bf2',
    500: '#9872eb',
    950: '#000000',
  },
}
SCSS
$custom: #9872eb;
$custom-light: #ba9bf2;
$custom-dark: #000000;
JSON
{
  "hex": "#9872eb",
  "rgb": {
    "r": 152,
    "g": 114,
    "b": 235
  },
  "hsl": {
    "h": 258.843,
    "s": 75.155,
    "l": 68.431
  },
  "oklch": {
    "l": 0.64443,
    "c": 0.17597,
    "h": 295.5
  },
  "luminance": 0.24708
}

Semantic roles & 50–950 ramp

primary
#9872EB
secondary
#E3EFCA
accent
#D70E98
background
#FBF9FE
surface
#F7F2FD
border
#D0CCD5
text
#120E17
muted
#817E85

Preview Lab

Preview with #9872EB

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

Preview Lab → · Contrast checker → · Palette generator →

#9872EB Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva