#9840B2#9840B2

#9840B2 is a mid, vivid purple. Relative luminance 0.136; OKLCH L 53.7% C 0.186 H 317.7°. Best body text is #FFFFFF at 5.66:1 contrast (WCAG AA passes).

Color values

HEX#9840B2
RGBrgb(152, 64, 178)
HSLhsl(286, 47%, 47%)
HSVhsv(286, 64%, 70%)
CMYKcmyk(14.6%, 64%, 0%, 30.2%)
CIE-LABlab(43.59, 53.89, -44.59)
CIE-LCHlch(43.59, 69.94, 320.40°)
OKLaboklab(53.7% 0.1373 -0.1248)
OKLCHoklch(53.7% 0.186 317.7)
XYZxyz(22.8170, 13.5575, 43.5258)
Luminance0.1356 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840B2 #5AB240
analogous
#5F40B2 #9840B2 #B24093
triadic
#9840B2 #B29840 #40B298
tetradic
#9840B2 #B25F40 #5AB240 #4093B2
square
#9840B2 #B25F40 #5AB240 #4093B2
split-complementary
#9840B2 #93B240 #40B25F
monochromatic
#4B2058 #723085 #9840B2 #B267C8 #C994D8

Accessibility & contrast

On white

5.66
#9840B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.71
#9840B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840B2
5.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840B2#FFFFFF#000000##FFFFFF
##9840B21.005.663.715.66
#FFFFFF5.661.0021.001.00
#0000003.7121.001.0021.00
##FFFFFF5.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1A61B5
Deuteranopia (green-blind)
#446AAF
Tritanopia (blue-blind)
#975473
Achromatopsia (no color)
#676767

Design tokens & code

CSS
--color: #9840b2;
/* rgb */ color: rgb(152, 64, 178);
/* oklch */ color: oklch(53.7% 0.186 317.7);
Tailwind
colors: {
  custom: {
    50: '#b97bc9',
    500: '#9840b2',
    950: '#000000',
  },
}
SCSS
$custom: #9840b2;
$custom-light: #b97bc9;
$custom-dark: #000000;
JSON
{
  "hex": "#9840b2",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 286.316,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.53696,
    "c": 0.18555,
    "h": 317.7
  },
  "luminance": 0.13557
}

Semantic roles & 50–950 ramp

primary
#9840B2
secondary
#97C48A
accent
#D75170
background
#FBF7FC
surface
#F7EEF8
border
#D0C9D1
text
#120A13
muted
#817C82

Preview Lab

Preview with #9840B2

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

Preview Lab → · Contrast checker → · Palette generator →

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