#9840D3#9840D3

#9840D3 is a mid, highly saturated violet. Relative luminance 0.150; OKLCH L 55.9% C 0.218 H 308.3°. Best body text is #FFFFFF at 5.24:1 contrast (WCAG AA passes).

Color values

HEX#9840D3
RGBrgb(152, 64, 211)
HSLhsl(276, 63%, 54%)
HSVhsv(276, 70%, 83%)
CMYKcmyk(28%, 69.7%, 0%, 17.3%)
CIE-LABlab(45.70, 60.86, -60.39)
CIE-LCHlch(45.70, 85.74, 315.22°)
OKLaboklab(55.88% 0.1349 -0.1711)
OKLCHoklch(55.88% 0.218 308.3)
XYZxyz(26.5377, 15.0458, 63.1215)
Luminance0.1505 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840D3 #7BD340
analogous
#4F40D3 #9840D3 #D340C5
triadic
#9840D3 #D39840 #40D398
tetradic
#9840D3 #D34F40 #7BD340 #40C5D3
square
#9840D3 #D34F40 #7BD340 #40C5D3
split-complementary
#9840D3 #C5D340 #40D34F
monochromatic
#561D7C #7828AE #9840D3 #B372DE #CEA3EA

Accessibility & contrast

On white

5.24
#9840D3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.01
#9840D3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840D3
5.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840D3#FFFFFF#000000##FFFFFF
##9840D31.005.244.015.24
#FFFFFF5.241.0021.001.00
#0000004.0121.001.0021.00
##FFFFFF5.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0069D7
Deuteranopia (green-blind)
#1B6DD0
Tritanopia (blue-blind)
#8F6185
Achromatopsia (no color)
#6C6C6C

Design tokens & code

CSS
--color: #9840d3;
/* rgb */ color: rgb(152, 64, 211);
/* oklch */ color: oklch(55.9% 0.218 308.3);
Tailwind
colors: {
  custom: {
    50: '#bb7ce1',
    500: '#9840d3',
    950: '#000000',
  },
}
SCSS
$custom: #9840d3;
$custom-light: #bb7ce1;
$custom-dark: #000000;
JSON
{
  "hex": "#9840d3",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 211
  },
  "hsl": {
    "h": 275.918,
    "s": 62.553,
    "l": 53.922
  },
  "oklch": {
    "l": 0.55879,
    "c": 0.21794,
    "h": 308.3
  },
  "luminance": 0.15045
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #9840D3

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

Preview Lab → · Contrast checker → · Palette generator →

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