#9840D4#9840D4

#9840D4 is a mid, highly saturated violet. Relative luminance 0.151; OKLCH L 56.0% C 0.219 H 308.0°. Best body text is #FFFFFF at 5.22:1 contrast (WCAG AA passes).

Color values

HEX#9840D4
RGBrgb(152, 64, 212)
HSLhsl(276, 63%, 54%)
HSVhsv(276, 70%, 83%)
CMYKcmyk(28.3%, 69.8%, 0%, 16.9%)
CIE-LABlab(45.77, 61.08, -60.85)
CIE-LCHlch(45.77, 86.22, 315.11°)
OKLaboklab(55.95% 0.1348 -0.1725)
OKLCHoklch(55.95% 0.219 308)
XYZxyz(26.6635, 15.0961, 63.7838)
Luminance0.1510 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840D4 #7CD440
analogous
#4E40D4 #9840D4 #D440C6
triadic
#9840D4 #D49840 #40D498
tetradic
#9840D4 #D44E40 #7CD440 #40C6D4
square
#9840D4 #D44E40 #7CD440 #40C6D4
split-complementary
#9840D4 #C6D440 #40D44E
monochromatic
#561C7D #7827AF #9840D4 #B372DF #CEA4EA

Accessibility & contrast

On white

5.22
#9840D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.02
#9840D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840D4
5.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840D4#FFFFFF#000000##FFFFFF
##9840D41.005.224.025.22
#FFFFFF5.221.0021.001.00
#0000004.0221.001.0021.00
##FFFFFF5.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0069D8
Deuteranopia (green-blind)
#186DD1
Tritanopia (blue-blind)
#8F6186
Achromatopsia (no color)
#6C6C6C

Design tokens & code

CSS
--color: #9840d4;
/* rgb */ color: rgb(152, 64, 212);
/* oklch */ color: oklch(56.0% 0.219 308.0);
Tailwind
colors: {
  custom: {
    50: '#bb7ce2',
    500: '#9840d4',
    950: '#000000',
  },
}
SCSS
$custom: #9840d4;
$custom-light: #bb7ce2;
$custom-dark: #000000;
JSON
{
  "hex": "#9840d4",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 275.676,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.5595,
    "c": 0.21893,
    "h": 308
  },
  "luminance": 0.15096
}

Semantic roles & 50–950 ramp

primary
#9840D4
secondary
#B2D798
accent
#E64284
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#120A15
muted
#817C83

Preview Lab

Preview with #9840D4

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

Preview Lab → · Contrast checker → · Palette generator →

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