#9840D6#9840D6

#9840D6 is a mid, highly saturated violet. Relative luminance 0.152; OKLCH L 56.1% C 0.221 H 307.5°. Best body text is #FFFFFF at 5.20:1 contrast (WCAG AA passes).

Color values

HEX#9840D6
RGBrgb(152, 64, 214)
HSLhsl(275, 65%, 55%)
HSVhsv(275, 70%, 84%)
CMYKcmyk(29%, 70.1%, 0%, 16.1%)
CIE-LABlab(45.90, 61.52, -61.78)
CIE-LCHlch(45.90, 87.18, 314.88°)
OKLaboklab(56.09% 0.1345 -0.1752)
OKLCHoklch(56.09% 0.221 307.5)
XYZxyz(26.9173, 15.1976, 65.1207)
Luminance0.1520 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840D6 #7ED640
analogous
#4D40D6 #9840D6 #D640C9
triadic
#9840D6 #D69840 #40D698
tetradic
#9840D6 #D64D40 #7ED640 #40C9D6
square
#9840D6 #D64D40 #7ED640 #40C9D6
split-complementary
#9840D6 #C9D640 #40D64D
monochromatic
#571B80 #7926B2 #9840D6 #B372E1 #CEA5EC

Accessibility & contrast

On white

5.20
#9840D6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.04
#9840D6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840D6
5.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840D6#FFFFFF#000000##FFFFFF
##9840D61.005.204.045.20
#FFFFFF5.201.0021.001.00
#0000004.0421.001.0021.00
##FFFFFF5.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ADA
Deuteranopia (green-blind)
#126DD3
Tritanopia (blue-blind)
#8E6287
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #9840d6;
/* rgb */ color: rgb(152, 64, 214);
/* oklch */ color: oklch(56.1% 0.221 307.5);
Tailwind
colors: {
  custom: {
    50: '#bb7ce3',
    500: '#9840d6',
    950: '#000000',
  },
}
SCSS
$custom: #9840d6;
$custom-light: #bb7ce3;
$custom-dark: #000000;
JSON
{
  "hex": "#9840d6",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 214
  },
  "hsl": {
    "h": 275.2,
    "s": 64.655,
    "l": 54.51
  },
  "oklch": {
    "l": 0.56092,
    "c": 0.22091,
    "h": 307.5
  },
  "luminance": 0.15197
}

Semantic roles & 50–950 ramp

primary
#9840D6
secondary
#B3D999
accent
#E84085
background
#FCF7FE
surface
#F8EEFC
border
#D1C9D5
text
#120A16
muted
#817C84

Preview Lab

Preview with #9840D6

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

Preview Lab → · Contrast checker → · Palette generator →

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