#9842CB#9842CB

#9842CB is a mid, highly saturated violet. Relative luminance 0.149; OKLCH L 55.5% C 0.208 H 310.1°. Best body text is #FFFFFF at 5.28:1 contrast (WCAG AA passes).

Color values

HEX#9842CB
RGBrgb(152, 66, 203)
HSLhsl(278, 57%, 53%)
HSVhsv(278, 67%, 80%)
CMYKcmyk(25.1%, 67.5%, 0%, 20.4%)
CIE-LABlab(45.48, 58.24, -56.14)
CIE-LCHlch(45.48, 80.89, 316.05°)
OKLaboklab(55.55% 0.1337 -0.1587)
OKLCHoklch(55.55% 0.208 310.1)
XYZxyz(25.6745, 14.8842, 58.0088)
Luminance0.1488 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9842CB #75CB42
analogous
#5342CB #9842CB #CB42B9
triadic
#9842CB #CB9842 #42CB98
tetradic
#9842CB #CB5342 #75CB42 #42B9CB
square
#9842CB #CB5342 #75CB42 #42B9CB
split-complementary
#9842CB #B9CB42 #42CB53
monochromatic
#542073 #772DA3 #9842CB #B272D8 #CCA2E5

Accessibility & contrast

On white

5.28
#9842CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.98
#9842CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9842CB
5.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9842CB#FFFFFF#000000##FFFFFF
##9842CB1.005.283.985.28
#FFFFFF5.281.0021.001.00
#0000003.9821.001.0021.00
##FFFFFF5.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0068CF
Deuteranopia (green-blind)
#2D6DC8
Tritanopia (blue-blind)
#915F81
Achromatopsia (no color)
#6C6C6C

Design tokens & code

CSS
--color: #9842cb;
/* rgb */ color: rgb(152, 66, 203);
/* oklch */ color: oklch(55.5% 0.208 310.1);
Tailwind
colors: {
  custom: {
    50: '#ba7ddc',
    500: '#9842cb',
    950: '#000000',
  },
}
SCSS
$custom: #9842cb;
$custom-light: #ba7ddc;
$custom-dark: #000000;
JSON
{
  "hex": "#9842cb",
  "rgb": {
    "r": 152,
    "g": 66,
    "b": 203
  },
  "hsl": {
    "h": 277.664,
    "s": 56.846,
    "l": 52.745
  },
  "oklch": {
    "l": 0.5555,
    "c": 0.20752,
    "h": 310.1
  },
  "luminance": 0.14884
}

Semantic roles & 50–950 ramp

primary
#9842CB
secondary
#ADD297
accent
#E04880
background
#FBF7FD
surface
#F7EEFB
border
#D0C9D4
text
#120A15
muted
#817C83

Preview Lab

Preview with #9842CB

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

Preview Lab → · Contrast checker → · Palette generator →

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