#9840D9#9840D9

#9840D9 is a mid, highly saturated violet. Relative luminance 0.154; OKLCH L 56.3% C 0.224 H 306.8°. Best body text is #FFFFFF at 5.16:1 contrast (WCAG AA passes).

Color values

HEX#9840D9
RGBrgb(152, 64, 217)
HSLhsl(275, 67%, 55%)
HSVhsv(275, 71%, 85%)
CMYKcmyk(30%, 70.5%, 0%, 14.9%)
CIE-LABlab(46.11, 62.18, -63.15)
CIE-LCHlch(46.11, 88.63, 314.56°)
OKLaboklab(56.31% 0.1341 -0.1793)
OKLCHoklch(56.31% 0.224 306.8)
XYZxyz(27.3040, 15.3523, 67.1571)
Luminance0.1535 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840D9 #81D940
analogous
#4C40D9 #9840D9 #D940CD
triadic
#9840D9 #D99840 #40D998
tetradic
#9840D9 #D94C40 #81D940 #40CDD9
square
#9840D9 #D94C40 #81D940 #40CDD9
split-complementary
#9840D9 #CDD940 #40D94C
monochromatic
#571A84 #7924B7 #9840D9 #B473E3 #CFA6ED

Accessibility & contrast

On white

5.16
#9840D9 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.07
#9840D9 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840D9
5.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840D9#FFFFFF#000000##FFFFFF
##9840D91.005.164.075.16
#FFFFFF5.161.0021.001.00
#0000004.0721.001.0021.00
##FFFFFF5.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ADD
Deuteranopia (green-blind)
#046ED6
Tritanopia (blue-blind)
#8D6388
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #9840d9;
/* rgb */ color: rgb(152, 64, 217);
/* oklch */ color: oklch(56.3% 0.224 306.8);
Tailwind
colors: {
  custom: {
    50: '#bb7ce6',
    500: '#9840d9',
    950: '#000000',
  },
}
SCSS
$custom: #9840d9;
$custom-light: #bb7ce6;
$custom-dark: #000000;
JSON
{
  "hex": "#9840d9",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 217
  },
  "hsl": {
    "h": 274.51,
    "s": 66.812,
    "l": 55.098
  },
  "oklch": {
    "l": 0.56307,
    "c": 0.22387,
    "h": 306.8
  },
  "luminance": 0.15352
}

Semantic roles & 50–950 ramp

primary
#9840D9
secondary
#B6DA9A
accent
#EA3E87
background
#FCF7FE
surface
#F8EEFC
border
#D1C9D5
text
#120A16
muted
#817C84

Preview Lab

Preview with #9840D9

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

Preview Lab → · Contrast checker → · Palette generator →

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