#9840CB#9840CB

#9840CB is a mid, highly saturated violet. Relative luminance 0.147; OKLCH L 55.3% C 0.210 H 310.3°. Best body text is #FFFFFF at 5.34:1 contrast (WCAG AA passes).

Color values

HEX#9840CB
RGBrgb(152, 64, 203)
HSLhsl(278, 57%, 52%)
HSVhsv(278, 68%, 80%)
CMYKcmyk(25.1%, 68.5%, 0%, 20.4%)
CIE-LABlab(45.16, 59.12, -56.65)
CIE-LCHlch(45.16, 81.89, 316.22°)
OKLaboklab(55.32% 0.1359 -0.1602)
OKLCHoklch(55.32% 0.21 310.3)
XYZxyz(25.5597, 14.6545, 57.9705)
Luminance0.1465 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840CB #73CB40
analogous
#5340CB #9840CB #CB40B8
triadic
#9840CB #CB9840 #40CB98
tetradic
#9840CB #CB5340 #73CB40 #40B8CB
square
#9840CB #CB5340 #73CB40 #40B8CB
split-complementary
#9840CB #B8CB40 #40CB53
monochromatic
#531F72 #772CA2 #9840CB #B270D8 #CCA0E5

Accessibility & contrast

On white

5.34
#9840CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.93
#9840CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840CB
5.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840CB#FFFFFF#000000##FFFFFF
##9840CB1.005.343.935.34
#FFFFFF5.341.0021.001.00
#0000003.9321.001.0021.00
##FFFFFF5.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0067CF
Deuteranopia (green-blind)
#2A6CC8
Tritanopia (blue-blind)
#915E81
Achromatopsia (no color)
#6B6B6B

Design tokens & code

CSS
--color: #9840cb;
/* rgb */ color: rgb(152, 64, 203);
/* oklch */ color: oklch(55.3% 0.210 310.3);
Tailwind
colors: {
  custom: {
    50: '#bb7cdc',
    500: '#9840cb',
    950: '#000000',
  },
}
SCSS
$custom: #9840cb;
$custom-light: #bb7cdc;
$custom-dark: #000000;
JSON
{
  "hex": "#9840cb",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 277.986,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.55323,
    "c": 0.21004,
    "h": 310.3
  },
  "luminance": 0.14654
}

Semantic roles & 50–950 ramp

primary
#9840CB
secondary
#ABD295
accent
#E04780
background
#FBF7FD
surface
#F7EEFB
border
#D0C9D4
text
#120A15
muted
#817C83

Preview Lab

Preview with #9840CB

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

Preview Lab → · Contrast checker → · Palette generator →

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