#9840C0#9840C0

#9840C0 is a mid, vivid purple. Relative luminance 0.141; OKLCH L 54.6% C 0.199 H 313.4°. Best body text is #FFFFFF at 5.48:1 contrast (WCAG AA passes).

Color values

HEX#9840C0
RGBrgb(152, 64, 192)
HSLhsl(281, 50%, 50%)
HSVhsv(281, 67%, 75%)
CMYKcmyk(20.8%, 66.7%, 0%, 24.7%)
CIE-LABlab(44.45, 56.78, -51.42)
CIE-LCHlch(44.45, 76.60, 317.84°)
OKLaboklab(54.59% 0.1368 -0.1448)
OKLCHoklch(54.59% 0.199 313.4)
XYZxyz(24.2951, 14.1487, 51.3101)
Luminance0.1415 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840C0 #68C040
analogous
#5840C0 #9840C0 #C040A8
triadic
#9840C0 #C09840 #40C098
tetradic
#9840C0 #C05840 #68C040 #40A8C0
square
#9840C0 #C05840 #68C040 #40A8C0
split-complementary
#9840C0 #A8C040 #40C058
monochromatic
#4F2164 #743092 #9840C0 #B16ECF #CA9CDE

Accessibility & contrast

On white

5.48
#9840C0 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.83
#9840C0 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840C0
5.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840C0#FFFFFF#000000##FFFFFF
##9840C01.005.483.835.48
#FFFFFF5.481.0021.001.00
#0000003.8321.001.0021.00
##FFFFFF5.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064C4
Deuteranopia (green-blind)
#386BBD
Tritanopia (blue-blind)
#94597B
Achromatopsia (no color)
#696969

Design tokens & code

CSS
--color: #9840c0;
/* rgb */ color: rgb(152, 64, 192);
/* oklch */ color: oklch(54.6% 0.199 313.4);
Tailwind
colors: {
  custom: {
    50: '#ba7bd4',
    500: '#9840c0',
    950: '#000000',
  },
}
SCSS
$custom: #9840c0;
$custom-light: #ba7bd4;
$custom-dark: #000000;
JSON
{
  "hex": "#9840c0",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 192
  },
  "hsl": {
    "h": 281.25,
    "s": 50.394,
    "l": 50.196
  },
  "oklch": {
    "l": 0.54586,
    "c": 0.19921,
    "h": 313.4
  },
  "luminance": 0.14148
}

Semantic roles & 50–950 ramp

primary
#9840C0
secondary
#A3CB91
accent
#DA4E7A
background
#FBF7FD
surface
#F7EEFA
border
#D0C9D3
text
#120A14
muted
#817C83

Preview Lab

Preview with #9840C0

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

Preview Lab → · Contrast checker → · Palette generator →

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