#9840B1#9840B1

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

Color values

HEX#9840B1
RGBrgb(152, 64, 177)
HSLhsl(287, 47%, 47%)
HSVhsv(287, 64%, 69%)
CMYKcmyk(14.1%, 63.8%, 0%, 30.6%)
CIE-LABlab(43.53, 53.69, -44.09)
CIE-LCHlch(43.53, 69.47, 320.61°)
OKLaboklab(53.64% 0.1373 -0.1234)
OKLCHoklch(53.64% 0.185 318.1)
XYZxyz(22.7170, 13.5175, 42.9990)
Luminance0.1352 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840B1 #59B140
analogous
#6040B1 #9840B1 #B14091
triadic
#9840B1 #B19840 #40B198
tetradic
#9840B1 #B16040 #59B140 #4091B1
square
#9840B1 #B16040 #59B140 #4091B1
split-complementary
#9840B1 #91B140 #40B160
monochromatic
#4B1F57 #713084 #9840B1 #B266C8 #C993D8

Accessibility & contrast

On white

5.67
#9840B1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

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

Best text color

#FFFFFF on #9840B1
5.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840B1#FFFFFF#000000##FFFFFF
##9840B11.005.673.705.67
#FFFFFF5.671.0021.001.00
#0000003.7021.001.0021.00
##FFFFFF5.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1C61B4
Deuteranopia (green-blind)
#456AAE
Tritanopia (blue-blind)
#975473
Achromatopsia (no color)
#676767

Design tokens & code

CSS
--color: #9840b1;
/* rgb */ color: rgb(152, 64, 177);
/* oklch */ color: oklch(53.6% 0.185 318.1);
Tailwind
colors: {
  custom: {
    50: '#b97bc9',
    500: '#9840b1',
    950: '#000000',
  },
}
SCSS
$custom: #9840b1;
$custom-light: #b97bc9;
$custom-dark: #000000;
JSON
{
  "hex": "#9840b1",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 177
  },
  "hsl": {
    "h": 286.726,
    "s": 46.888,
    "l": 47.255
  },
  "oklch": {
    "l": 0.53635,
    "c": 0.18459,
    "h": 318.1
  },
  "luminance": 0.13517
}

Semantic roles & 50–950 ramp

primary
#9840B1
secondary
#96C389
accent
#D7516F
background
#FBF7FC
surface
#F7EEF8
border
#D0C9D1
text
#120A13
muted
#817C82

Preview Lab

Preview with #9840B1

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

Preview Lab → · Contrast checker → · Palette generator →

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