#9840C1#9840C1

#9840C1 is a mid, highly saturated purple. Relative luminance 0.142; OKLCH L 54.7% C 0.200 H 313.1°. Best body text is #FFFFFF at 5.47:1 contrast (WCAG AA passes).

Color values

HEX#9840C1
RGBrgb(152, 64, 193)
HSLhsl(281, 51%, 50%)
HSVhsv(281, 67%, 76%)
CMYKcmyk(21.2%, 66.8%, 0%, 24.3%)
CIE-LABlab(44.51, 56.99, -51.90)
CIE-LCHlch(44.51, 77.08, 317.68°)
OKLaboklab(54.65% 0.1367 -0.1462)
OKLCHoklch(54.65% 0.2 313.1)
XYZxyz(24.4062, 14.1932, 51.8956)
Luminance0.1419 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840C1 #69C140
analogous
#5740C1 #9840C1 #C140AA
triadic
#9840C1 #C19840 #40C198
tetradic
#9840C1 #C15740 #69C140 #40AAC1
square
#9840C1 #C15740 #69C140 #40AAC1
split-complementary
#9840C1 #AAC140 #40C157
monochromatic
#502166 #743094 #9840C1 #B16ED0 #CA9CDF

Accessibility & contrast

On white

5.47
#9840C1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.84
#9840C1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840C1
5.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840C1#FFFFFF#000000##FFFFFF
##9840C11.005.473.845.47
#FFFFFF5.471.0021.001.00
#0000003.8421.001.0021.00
##FFFFFF5.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065C5
Deuteranopia (green-blind)
#376BBE
Tritanopia (blue-blind)
#945A7B
Achromatopsia (no color)
#696969

Design tokens & code

CSS
--color: #9840c1;
/* rgb */ color: rgb(152, 64, 193);
/* oklch */ color: oklch(54.7% 0.200 313.1);
Tailwind
colors: {
  custom: {
    50: '#ba7bd4',
    500: '#9840c1',
    950: '#000000',
  },
}
SCSS
$custom: #9840c1;
$custom-light: #ba7bd4;
$custom-dark: #000000;
JSON
{
  "hex": "#9840c1",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 193
  },
  "hsl": {
    "h": 280.93,
    "s": 50.988,
    "l": 50.392
  },
  "oklch": {
    "l": 0.54651,
    "c": 0.20019,
    "h": 313.1
  },
  "luminance": 0.14192
}

Semantic roles & 50–950 ramp

primary
#9840C1
secondary
#A4CB92
accent
#DA4D7A
background
#FBF7FD
surface
#F7EEFA
border
#D0C9D3
text
#120A14
muted
#817C83

Preview Lab

Preview with #9840C1

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

Preview Lab → · Contrast checker → · Palette generator →

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