#9840A1#9840A1

#9840A1 is a mid, vivid purple. Relative luminance 0.129; OKLCH L 52.7% C 0.169 H 323.9°. Best body text is #FFFFFF at 5.86:1 contrast (WCAG AA passes).

Color values

HEX#9840A1
RGBrgb(152, 64, 161)
HSLhsl(294, 43%, 44%)
HSVhsv(294, 60%, 63%)
CMYKcmyk(5.6%, 60.2%, 0%, 36.9%)
CIE-LABlab(42.64, 50.55, -36.02)
CIE-LCHlch(42.64, 62.07, 324.53°)
OKLaboklab(52.7% 0.1368 -0.0999)
OKLCHoklch(52.7% 0.169 323.9)
XYZxyz(21.2147, 12.9166, 35.0870)
Luminance0.1291 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840A1 #49A140
analogous
#6840A1 #9840A1 #A1407A
triadic
#9840A1 #A19840 #40A198
tetradic
#9840A1 #A16840 #49A140 #407AA1
square
#9840A1 #A16840 #49A140 #407AA1
split-complementary
#9840A1 #7AA140 #40A168
monochromatic
#451D49 #6F2F75 #9840A1 #B65FBF #CA8BD1

Accessibility & contrast

On white

5.86
#9840A1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.58
#9840A1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840A1
5.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840A1#FFFFFF#000000##FFFFFF
##9840A11.005.863.585.86
#FFFFFF5.861.0021.001.00
#0000003.5821.001.0021.00
##FFFFFF5.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2F5EA4
Deuteranopia (green-blind)
#4F689E
Tritanopia (blue-blind)
#9B4E6A
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #9840a1;
/* rgb */ color: rgb(152, 64, 161);
/* oklch */ color: oklch(52.7% 0.169 323.9);
Tailwind
colors: {
  custom: {
    50: '#b97abd',
    500: '#9840a1',
    950: '#000000',
  },
}
SCSS
$custom: #9840a1;
$custom-light: #b97abd;
$custom-dark: #000000;
JSON
{
  "hex": "#9840a1",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 161
  },
  "hsl": {
    "h": 294.433,
    "s": 43.111,
    "l": 44.118
  },
  "oklch": {
    "l": 0.52696,
    "c": 0.16938,
    "h": 323.9
  },
  "luminance": 0.12915
}

Semantic roles & 50–950 ramp

primary
#9840A1
secondary
#87BC81
accent
#D35561
background
#FBF7FB
surface
#F6EEF6
border
#D0C9D0
text
#120A12
muted
#817C81

Preview Lab

Preview with #9840A1

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

Preview Lab → · Contrast checker → · Palette generator →

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