#9840A4#9840A4

#9840A4 is a mid, vivid purple. Relative luminance 0.130; OKLCH L 52.9% C 0.172 H 322.7°. Best body text is #FFFFFF at 5.83:1 contrast (WCAG AA passes).

Color values

HEX#9840A4
RGBrgb(152, 64, 164)
HSLhsl(293, 44%, 45%)
HSVhsv(293, 61%, 64%)
CMYKcmyk(7.3%, 61%, 0%, 35.7%)
CIE-LABlab(42.80, 51.13, -37.55)
CIE-LCHlch(42.80, 63.44, 323.70°)
OKLaboklab(52.87% 0.137 -0.1043)
OKLCHoklch(52.87% 0.172 322.7)
XYZxyz(21.4825, 13.0236, 36.4970)
Luminance0.1302 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840A4 #4CA440
analogous
#6640A4 #9840A4 #A4407E
triadic
#9840A4 #A49840 #40A498
tetradic
#9840A4 #A46640 #4CA440 #407EA4
square
#9840A4 #A46640 #4CA440 #407EA4
split-complementary
#9840A4 #7EA440 #40A466
monochromatic
#461E4C #6F2F78 #9840A4 #B560C1 #CA8CD2

Accessibility & contrast

On white

5.83
#9840A4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.60
#9840A4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840A4
5.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840A4#FFFFFF#000000##FFFFFF
##9840A41.005.833.605.83
#FFFFFF5.831.0021.001.00
#0000003.6021.001.0021.00
##FFFFFF5.831.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #9840a4;
/* rgb */ color: rgb(152, 64, 164);
/* oklch */ color: oklch(52.9% 0.172 322.7);
Tailwind
colors: {
  custom: {
    50: '#b97abf',
    500: '#9840a4',
    950: '#000000',
  },
}
SCSS
$custom: #9840a4;
$custom-light: #b97abf;
$custom-dark: #000000;
JSON
{
  "hex": "#9840a4",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 164
  },
  "hsl": {
    "h": 292.8,
    "s": 43.86,
    "l": 44.706
  },
  "oklch": {
    "l": 0.52866,
    "c": 0.17218,
    "h": 322.7
  },
  "luminance": 0.13023
}

Semantic roles & 50–950 ramp

primary
#9840A4
secondary
#8ABD83
accent
#D45463
background
#FBF7FB
surface
#F6EEF7
border
#D0C9D0
text
#120A12
muted
#817C81

Preview Lab

Preview with #9840A4

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

Preview Lab → · Contrast checker → · Palette generator →

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