#9840B4#9840B4

#9840B4 is a mid, vivid purple. Relative luminance 0.136; OKLCH L 53.8% C 0.187 H 317.1°. Best body text is #FFFFFF at 5.63:1 contrast (WCAG AA passes).

Color values

HEX#9840B4
RGBrgb(152, 64, 180)
HSLhsl(286, 48%, 48%)
HSVhsv(286, 64%, 71%)
CMYKcmyk(15.6%, 64.4%, 0%, 29.4%)
CIE-LABlab(43.71, 54.30, -45.57)
CIE-LCHlch(43.71, 70.89, 319.99°)
OKLaboklab(53.82% 0.1373 -0.1277)
OKLCHoklch(53.82% 0.187 317.1)
XYZxyz(23.0193, 13.6384, 44.5911)
Luminance0.1364 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840B4 #5CB440
analogous
#5E40B4 #9840B4 #B44096
triadic
#9840B4 #B49840 #40B498
tetradic
#9840B4 #B45E40 #5CB440 #4096B4
square
#9840B4 #B45E40 #5CB440 #4096B4
split-complementary
#9840B4 #96B440 #40B45E
monochromatic
#4C205A #723087 #9840B4 #B268C9 #C995D9

Accessibility & contrast

On white

5.63
#9840B4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.73
#9840B4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840B4
5.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840B4#FFFFFF#000000##FFFFFF
##9840B41.005.633.735.63
#FFFFFF5.631.0021.001.00
#0000003.7321.001.0021.00
##FFFFFF5.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1662B8
Deuteranopia (green-blind)
#436AB1
Tritanopia (blue-blind)
#975574
Achromatopsia (no color)
#676767

Design tokens & code

CSS
--color: #9840b4;
/* rgb */ color: rgb(152, 64, 180);
/* oklch */ color: oklch(53.8% 0.187 317.1);
Tailwind
colors: {
  custom: {
    50: '#b97bcb',
    500: '#9840b4',
    950: '#000000',
  },
}
SCSS
$custom: #9840b4;
$custom-light: #b97bcb;
$custom-dark: #000000;
JSON
{
  "hex": "#9840b4",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 180
  },
  "hsl": {
    "h": 285.517,
    "s": 47.541,
    "l": 47.843
  },
  "oklch": {
    "l": 0.5382,
    "c": 0.18749,
    "h": 317.1
  },
  "luminance": 0.13637
}

Semantic roles & 50–950 ramp

primary
#9840B4
secondary
#99C58B
accent
#D75171
background
#FBF7FC
surface
#F7EEF8
border
#D0C9D1
text
#120A13
muted
#817C82

Preview Lab

Preview with #9840B4

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

Preview Lab → · Contrast checker → · Palette generator →

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