#9840D1#9840D1

#9840D1 is a mid, highly saturated violet. Relative luminance 0.149; OKLCH L 55.7% C 0.216 H 308.8°. Best body text is #FFFFFF at 5.26:1 contrast (WCAG AA passes).

Color values

HEX#9840D1
RGBrgb(152, 64, 209)
HSLhsl(276, 61%, 54%)
HSVhsv(276, 69%, 82%)
CMYKcmyk(27.3%, 69.4%, 0%, 18%)
CIE-LABlab(45.56, 60.43, -59.46)
CIE-LCHlch(45.56, 84.78, 315.46°)
OKLaboklab(55.74% 0.1352 -0.1684)
OKLCHoklch(55.74% 0.216 308.8)
XYZxyz(26.2886, 14.9461, 61.8092)
Luminance0.1495 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840D1 #79D140
analogous
#4F40D1 #9840D1 #D140C1
triadic
#9840D1 #D19840 #40D198
tetradic
#9840D1 #D14F40 #79D140 #40C1D1
square
#9840D1 #D14F40 #79D140 #40C1D1
split-complementary
#9840D1 #C1D140 #40D14F
monochromatic
#551D79 #7829AB #9840D1 #B371DD #CDA3E9

Accessibility & contrast

On white

5.26
#9840D1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.99
#9840D1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840D1
5.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840D1#FFFFFF#000000##FFFFFF
##9840D11.005.263.995.26
#FFFFFF5.261.0021.001.00
#0000003.9921.001.0021.00
##FFFFFF5.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0068D5
Deuteranopia (green-blind)
#206DCE
Tritanopia (blue-blind)
#8F6084
Achromatopsia (no color)
#6C6C6C

Design tokens & code

CSS
--color: #9840d1;
/* rgb */ color: rgb(152, 64, 209);
/* oklch */ color: oklch(55.7% 0.216 308.8);
Tailwind
colors: {
  custom: {
    50: '#bb7ce0',
    500: '#9840d1',
    950: '#000000',
  },
}
SCSS
$custom: #9840d1;
$custom-light: #bb7ce0;
$custom-dark: #000000;
JSON
{
  "hex": "#9840d1",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 209
  },
  "hsl": {
    "h": 276.414,
    "s": 61.181,
    "l": 53.529
  },
  "oklch": {
    "l": 0.55738,
    "c": 0.21597,
    "h": 308.8
  },
  "luminance": 0.14946
}

Semantic roles & 50–950 ramp

primary
#9840D1
secondary
#B0D597
accent
#E44483
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#120A15
muted
#817C83

Preview Lab

Preview with #9840D1

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

Preview Lab → · Contrast checker → · Palette generator →

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