#9842D2#9842D2

#9842D2 is a mid, highly saturated violet. Relative luminance 0.152; OKLCH L 56.0% C 0.215 H 308.3°. Best body text is #FFFFFF at 5.19:1 contrast (WCAG AA passes).

Color values

HEX#9842D2
RGBrgb(152, 66, 210)
HSLhsl(276, 62%, 54%)
HSVhsv(276, 69%, 82%)
CMYKcmyk(27.6%, 68.6%, 0%, 17.6%)
CIE-LABlab(45.94, 59.77, -59.42)
CIE-LCHlch(45.94, 84.28, 315.17°)
OKLaboklab(56.03% 0.133 -0.1683)
OKLCHoklch(56.03% 0.215 308.3)
XYZxyz(26.5276, 15.2254, 62.5016)
Luminance0.1522 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9842D2 #7CD242
analogous
#5042D2 #9842D2 #D242C4
triadic
#9842D2 #D29842 #42D298
tetradic
#9842D2 #D25042 #7CD242 #42C4D2
square
#9842D2 #D25042 #7CD242 #42C4D2
split-complementary
#9842D2 #C4D242 #42D250
monochromatic
#561E7C #7829AD #9842D2 #B373DE #CEA5EA

Accessibility & contrast

On white

5.19
#9842D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.04
#9842D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9842D2
5.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9842D2#FFFFFF#000000##FFFFFF
##9842D21.005.194.045.19
#FFFFFF5.191.0021.001.00
#0000004.0421.001.0021.00
##FFFFFF5.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006AD6
Deuteranopia (green-blind)
#216ECF
Tritanopia (blue-blind)
#8F6285
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #9842d2;
/* rgb */ color: rgb(152, 66, 210);
/* oklch */ color: oklch(56.0% 0.215 308.3);
Tailwind
colors: {
  custom: {
    50: '#bb7de1',
    500: '#9842d2',
    950: '#000000',
  },
}
SCSS
$custom: #9842d2;
$custom-light: #bb7de1;
$custom-dark: #000000;
JSON
{
  "hex": "#9842d2",
  "rgb": {
    "r": 152,
    "g": 66,
    "b": 210
  },
  "hsl": {
    "h": 275.833,
    "s": 61.538,
    "l": 54.118
  },
  "oklch": {
    "l": 0.56032,
    "c": 0.21451,
    "h": 308.3
  },
  "luminance": 0.15225
}

Semantic roles & 50–950 ramp

primary
#9842D2
secondary
#B2D799
accent
#E54384
background
#FBF7FD
surface
#F7EEFB
border
#D0C9D4
text
#120A15
muted
#817C83

Preview Lab

Preview with #9842D2

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

Preview Lab → · Contrast checker → · Palette generator →

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