#9842E2#9842E2

#9842E2 is a mid, highly saturated violet. Relative luminance 0.161; OKLCH L 57.2% C 0.231 H 304.6°. Best body text is #FFFFFF at 4.99:1 contrast (WCAG AA passes).

Color values

HEX#9842E2
RGBrgb(152, 66, 226)
HSLhsl(272, 73%, 57%)
HSVhsv(272, 71%, 89%)
CMYKcmyk(32.7%, 70.8%, 0%, 11.4%)
CIE-LABlab(47.06, 63.34, -66.75)
CIE-LCHlch(47.06, 92.02, 313.50°)
OKLaboklab(57.18% 0.1307 -0.1898)
OKLCHoklch(57.18% 0.231 304.6)
XYZxyz(28.6215, 16.0629, 73.5294)
Luminance0.1606 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9842E2 #8CE242
analogous
#4842E2 #9842E2 #E242DC
triadic
#9842E2 #E29842 #42E298
tetradic
#9842E2 #E24842 #8CE242 #42DCE2
square
#9842E2 #E24842 #8CE242 #42DCE2
split-complementary
#9842E2 #DCE242 #42E248
monochromatic
#591793 #7A1FC8 #9842E2 #B577EA #D2ACF2

Accessibility & contrast

On white

4.99
#9842E2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.21
#9842E2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9842E2
4.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9842E2#FFFFFF#000000##FFFFFF
##9842E21.004.994.214.99
#FFFFFF4.991.0021.001.00
#0000004.2121.001.0021.00
##FFFFFF4.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006DE7
Deuteranopia (green-blind)
#0070DF
Tritanopia (blue-blind)
#8A688E
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #9842e2;
/* rgb */ color: rgb(152, 66, 226);
/* oklch */ color: oklch(57.2% 0.231 304.6);
Tailwind
colors: {
  custom: {
    50: '#bc7dec',
    500: '#9842e2',
    950: '#000000',
  },
}
SCSS
$custom: #9842e2;
$custom-light: #bc7dec;
$custom-dark: #000000;
JSON
{
  "hex": "#9842e2",
  "rgb": {
    "r": 152,
    "g": 66,
    "b": 226
  },
  "hsl": {
    "h": 272.25,
    "s": 73.394,
    "l": 57.255
  },
  "oklch": {
    "l": 0.57179,
    "c": 0.23051,
    "h": 304.6
  },
  "luminance": 0.16063
}

Semantic roles & 50–950 ramp

primary
#9842E2
secondary
#BDE09F
accent
#F0388D
background
#FCF8FE
surface
#F8EFFD
border
#D1CAD5
text
#130A16
muted
#827C84

Preview Lab

Preview with #9842E2

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

Preview Lab → · Contrast checker → · Palette generator →

#9842E2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva