#9872EC#9872EC

#9872EC is a light, vivid violet. Relative luminance 0.248; OKLCH L 64.5% C 0.177 H 295.4°. Best body text is #000000 at 5.95:1 contrast (WCAG AA passes).

Color values

HEX#9872EC
RGBrgb(152, 114, 236)
HSLhsl(259, 76%, 69%)
HSVhsv(259, 52%, 93%)
CMYKcmyk(35.6%, 51.7%, 0%, 7.5%)
CIE-LABlab(56.85, 41.30, -56.60)
CIE-LCHlch(56.85, 70.07, 306.12°)
OKLaboklab(64.5% 0.0759 -0.1602)
OKLCHoklch(64.5% 0.177 295.4)
XYZxyz(34.1027, 24.7655, 82.3241)
Luminance0.2477 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9872EC #C6EC72
analogous
#7289EC #9872EC #D572EC
triadic
#9872EC #EC9872 #72EC98
tetradic
#9872EC #EC7289 #C6EC72 #72ECD5
square
#9872EC #EC7289 #C6EC72 #72ECD5
split-complementary
#9872EC #ECD572 #89EC72
monochromatic
#511BC9 #713CE5 #9872EC #BFA8F3 #E7DEFB

Accessibility & contrast

On white

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

On black

5.95
#9872EC on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #9872EC
5.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9872EC#FFFFFF#000000##000000
##9872EC1.003.535.955.95
#FFFFFF3.531.0021.0021.00
#0000005.9521.001.001.00
##0000005.9521.001.001.00

Color blindness preview

Protanopia (red-blind)
#4189F0
Deuteranopia (green-blind)
#4A87E9
Tritanopia (blue-blind)
#848AA4
Achromatopsia (no color)
#888888

Design tokens & code

CSS
--color: #9872ec;
/* rgb */ color: rgb(152, 114, 236);
/* oklch */ color: oklch(64.5% 0.177 295.4);
Tailwind
colors: {
  custom: {
    50: '#ba9bf3',
    500: '#9872ec',
    950: '#000000',
  },
}
SCSS
$custom: #9872ec;
$custom-light: #ba9bf3;
$custom-dark: #000000;
JSON
{
  "hex": "#9872ec",
  "rgb": {
    "r": 152,
    "g": 114,
    "b": 236
  },
  "hsl": {
    "h": 258.689,
    "s": 76.25,
    "l": 68.627
  },
  "oklch": {
    "l": 0.64504,
    "c": 0.17723,
    "h": 295.4
  },
  "luminance": 0.24766
}

Semantic roles & 50–950 ramp

primary
#9872EC
secondary
#E4EFCB
accent
#D80D99
background
#FBF9FE
surface
#F7F2FD
border
#D0CCD5
text
#120E17
muted
#817E85

Preview Lab

Preview with #9872EC

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

Preview Lab → · Contrast checker → · Palette generator →

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