#9840A2#9840A2

#9840A2 is a mid, vivid purple. Relative luminance 0.130; OKLCH L 52.8% C 0.170 H 323.5°. Best body text is #FFFFFF at 5.85:1 contrast (WCAG AA passes).

Color values

HEX#9840A2
RGBrgb(152, 64, 162)
HSLhsl(294, 43%, 44%)
HSVhsv(294, 60%, 64%)
CMYKcmyk(6.2%, 60.5%, 0%, 36.5%)
CIE-LABlab(42.69, 50.74, -36.53)
CIE-LCHlch(42.69, 62.52, 324.25°)
OKLaboklab(52.75% 0.1369 -0.1013)
OKLCHoklch(52.75% 0.17 323.5)
XYZxyz(21.3033, 12.9520, 35.5533)
Luminance0.1295 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840A2 #4AA240
analogous
#6740A2 #9840A2 #A2407B
triadic
#9840A2 #A29840 #40A298
tetradic
#9840A2 #A26740 #4AA240 #407BA2
square
#9840A2 #A26740 #4AA240 #407BA2
split-complementary
#9840A2 #7BA240 #40A267
monochromatic
#461D4A #6F2F76 #9840A2 #B65FC0 #CA8BD1

Accessibility & contrast

On white

5.85
#9840A2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.59
#9840A2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840A2
5.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840A2#FFFFFF#000000##FFFFFF
##9840A21.005.853.595.85
#FFFFFF5.851.0021.001.00
#0000003.5921.001.0021.00
##FFFFFF5.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2E5EA5
Deuteranopia (green-blind)
#4E689F
Tritanopia (blue-blind)
#9B4E6B
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #9840a2;
/* rgb */ color: rgb(152, 64, 162);
/* oklch */ color: oklch(52.8% 0.170 323.5);
Tailwind
colors: {
  custom: {
    50: '#b97abe',
    500: '#9840a2',
    950: '#000000',
  },
}
SCSS
$custom: #9840a2;
$custom-light: #b97abe;
$custom-dark: #000000;
JSON
{
  "hex": "#9840a2",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 162
  },
  "hsl": {
    "h": 293.878,
    "s": 43.363,
    "l": 44.314
  },
  "oklch": {
    "l": 0.52752,
    "c": 0.17031,
    "h": 323.5
  },
  "luminance": 0.12951
}

Semantic roles & 50–950 ramp

primary
#9840A2
secondary
#88BC82
accent
#D35562
background
#FBF7FB
surface
#F6EEF7
border
#D0C9D0
text
#120A12
muted
#817C81

Preview Lab

Preview with #9840A2

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

Preview Lab → · Contrast checker → · Palette generator →

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