#9840B0#9840B0

#9840B0 is a mid, vivid purple. Relative luminance 0.135; OKLCH L 53.6% C 0.184 H 318.4°. Best body text is #FFFFFF at 5.68:1 contrast (WCAG AA passes).

Color values

HEX#9840B0
RGBrgb(152, 64, 176)
HSLhsl(287, 47%, 47%)
HSVhsv(287, 64%, 69%)
CMYKcmyk(13.6%, 63.6%, 0%, 31%)
CIE-LABlab(43.47, 53.49, -43.59)
CIE-LCHlch(43.47, 69.00, 320.82°)
OKLaboklab(53.57% 0.1373 -0.1219)
OKLCHoklch(53.57% 0.184 318.4)
XYZxyz(22.6177, 13.4777, 42.4760)
Luminance0.1348 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840B0 #58B040
analogous
#6040B0 #9840B0 #B04090
triadic
#9840B0 #B09840 #40B098
tetradic
#9840B0 #B06040 #58B040 #4090B0
square
#9840B0 #B06040 #58B040 #4090B0
split-complementary
#9840B0 #90B040 #40B060
monochromatic
#4A1F56 #713083 #9840B0 #B266C7 #C993D8

Accessibility & contrast

On white

5.68
#9840B0 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.70
#9840B0 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840B0
5.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840B0#FFFFFF#000000##FFFFFF
##9840B01.005.683.705.68
#FFFFFF5.681.0021.001.00
#0000003.7021.001.0021.00
##FFFFFF5.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1E61B3
Deuteranopia (green-blind)
#466AAD
Tritanopia (blue-blind)
#985372
Achromatopsia (no color)
#676767

Design tokens & code

CSS
--color: #9840b0;
/* rgb */ color: rgb(152, 64, 176);
/* oklch */ color: oklch(53.6% 0.184 318.4);
Tailwind
colors: {
  custom: {
    50: '#b97bc8',
    500: '#9840b0',
    950: '#000000',
  },
}
SCSS
$custom: #9840b0;
$custom-light: #b97bc8;
$custom-dark: #000000;
JSON
{
  "hex": "#9840b0",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 176
  },
  "hsl": {
    "h": 287.143,
    "s": 46.667,
    "l": 47.059
  },
  "oklch": {
    "l": 0.53574,
    "c": 0.18362,
    "h": 318.4
  },
  "luminance": 0.13477
}

Semantic roles & 50–950 ramp

primary
#9840B0
secondary
#95C389
accent
#D6516E
background
#FBF7FC
surface
#F7EEF8
border
#D0C9D1
text
#120A13
muted
#817C82

Preview Lab

Preview with #9840B0

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

Preview Lab → · Contrast checker → · Palette generator →

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