#9840B5#9840B5

#9840B5 is a mid, vivid purple. Relative luminance 0.137; OKLCH L 53.9% C 0.188 H 316.7°. Best body text is #FFFFFF at 5.62:1 contrast (WCAG AA passes).

Color values

HEX#9840B5
RGBrgb(152, 64, 181)
HSLhsl(285, 48%, 48%)
HSVhsv(285, 65%, 71%)
CMYKcmyk(16%, 64.6%, 0%, 29%)
CIE-LABlab(43.77, 54.50, -46.07)
CIE-LCHlch(43.77, 71.36, 319.79°)
OKLaboklab(53.88% 0.1373 -0.1291)
OKLCHoklch(53.88% 0.188 316.7)
XYZxyz(23.1215, 13.6793, 45.1295)
Luminance0.1368 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840B5 #5DB540
analogous
#5D40B5 #9840B5 #B54097
triadic
#9840B5 #B59840 #40B598
tetradic
#9840B5 #B55D40 #5DB540 #4097B5
square
#9840B5 #B55D40 #5DB540 #4097B5
split-complementary
#9840B5 #97B540 #40B55D
monochromatic
#4C205B #723088 #9840B5 #B268CA #C996DA

Accessibility & contrast

On white

5.62
#9840B5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.74
#9840B5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840B5
5.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840B5#FFFFFF#000000##FFFFFF
##9840B51.005.623.745.62
#FFFFFF5.621.0021.001.00
#0000003.7421.001.0021.00
##FFFFFF5.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1462B9
Deuteranopia (green-blind)
#426AB2
Tritanopia (blue-blind)
#975575
Achromatopsia (no color)
#676767

Design tokens & code

CSS
--color: #9840b5;
/* rgb */ color: rgb(152, 64, 181);
/* oklch */ color: oklch(53.9% 0.188 316.7);
Tailwind
colors: {
  custom: {
    50: '#ba7bcc',
    500: '#9840b5',
    950: '#000000',
  },
}
SCSS
$custom: #9840b5;
$custom-light: #ba7bcc;
$custom-dark: #000000;
JSON
{
  "hex": "#9840b5",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 181
  },
  "hsl": {
    "h": 285.128,
    "s": 47.755,
    "l": 48.039
  },
  "oklch": {
    "l": 0.53882,
    "c": 0.18846,
    "h": 316.7
  },
  "luminance": 0.13678
}

Semantic roles & 50–950 ramp

primary
#9840B5
secondary
#9AC58B
accent
#D75072
background
#FBF7FC
surface
#F7EEF9
border
#D0C9D2
text
#120A13
muted
#817C82

Preview Lab

Preview with #9840B5

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

Preview Lab → · Contrast checker → · Palette generator →

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