#9840A5#9840A5

#9840A5 is a mid, vivid purple. Relative luminance 0.131; OKLCH L 52.9% C 0.173 H 322.3°. Best body text is #FFFFFF at 5.81:1 contrast (WCAG AA passes).

Color values

HEX#9840A5
RGBrgb(152, 64, 165)
HSLhsl(292, 44%, 45%)
HSVhsv(292, 61%, 65%)
CMYKcmyk(7.9%, 61.2%, 0%, 35.3%)
CIE-LABlab(42.85, 51.32, -38.06)
CIE-LCHlch(42.85, 63.89, 323.44°)
OKLaboklab(52.92% 0.137 -0.1058)
OKLCHoklch(52.92% 0.173 322.3)
XYZxyz(21.5731, 13.0599, 36.9745)
Luminance0.1306 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840A5 #4DA540
analogous
#6540A5 #9840A5 #A54080
triadic
#9840A5 #A59840 #40A598
tetradic
#9840A5 #A56540 #4DA540 #4080A5
square
#9840A5 #A56540 #4DA540 #4080A5
split-complementary
#9840A5 #80A540 #40A565
monochromatic
#471E4D #6F2F79 #9840A5 #B561C2 #CA8DD3

Accessibility & contrast

On white

5.81
#9840A5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.61
#9840A5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840A5
5.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840A5#FFFFFF#000000##FFFFFF
##9840A51.005.813.615.81
#FFFFFF5.811.0021.001.00
#0000003.6121.001.0021.00
##FFFFFF5.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2C5FA8
Deuteranopia (green-blind)
#4D69A2
Tritanopia (blue-blind)
#9A4F6C
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #9840a5;
/* rgb */ color: rgb(152, 64, 165);
/* oklch */ color: oklch(52.9% 0.173 322.3);
Tailwind
colors: {
  custom: {
    50: '#b97ac0',
    500: '#9840a5',
    950: '#000000',
  },
}
SCSS
$custom: #9840a5;
$custom-light: #b97ac0;
$custom-dark: #000000;
JSON
{
  "hex": "#9840a5",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 165
  },
  "hsl": {
    "h": 292.277,
    "s": 44.105,
    "l": 44.902
  },
  "oklch": {
    "l": 0.52923,
    "c": 0.17312,
    "h": 322.3
  },
  "luminance": 0.13059
}

Semantic roles & 50–950 ramp

primary
#9840A5
secondary
#8BBE83
accent
#D45464
background
#FBF7FB
surface
#F6EEF7
border
#D0C9D0
text
#120A12
muted
#817C81

Preview Lab

Preview with #9840A5

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

Preview Lab → · Contrast checker → · Palette generator →

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