#9840C9#9840C9

#9840C9 is a mid, highly saturated violet. Relative luminance 0.146; OKLCH L 55.2% C 0.208 H 310.8°. Best body text is #FFFFFF at 5.37:1 contrast (WCAG AA passes).

Color values

HEX#9840C9
RGBrgb(152, 64, 201)
HSLhsl(279, 56%, 52%)
HSVhsv(279, 68%, 79%)
CMYKcmyk(24.4%, 68.2%, 0%, 21.2%)
CIE-LABlab(45.03, 58.69, -55.71)
CIE-LCHlch(45.03, 80.92, 316.49°)
OKLaboklab(55.19% 0.1361 -0.1574)
OKLCHoklch(55.19% 0.208 310.8)
XYZxyz(25.3229, 14.5598, 56.7234)
Luminance0.1456 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840C9 #71C940
analogous
#5440C9 #9840C9 #C940B6
triadic
#9840C9 #C99840 #40C998
tetradic
#9840C9 #C95440 #71C940 #40B6C9
square
#9840C9 #C95440 #71C940 #40B6C9
split-complementary
#9840C9 #B6C940 #40C954
monochromatic
#531F6F #762D9F #9840C9 #B270D6 #CB9FE4

Accessibility & contrast

On white

5.37
#9840C9 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.91
#9840C9 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840C9
5.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840C9#FFFFFF#000000##FFFFFF
##9840C91.005.373.915.37
#FFFFFF5.371.0021.001.00
#0000003.9121.001.0021.00
##FFFFFF5.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0066CD
Deuteranopia (green-blind)
#2D6CC6
Tritanopia (blue-blind)
#925D80
Achromatopsia (no color)
#6B6B6B

Design tokens & code

CSS
--color: #9840c9;
/* rgb */ color: rgb(152, 64, 201);
/* oklch */ color: oklch(55.2% 0.208 310.8);
Tailwind
colors: {
  custom: {
    50: '#ba7bda',
    500: '#9840c9',
    950: '#000000',
  },
}
SCSS
$custom: #9840c9;
$custom-light: #ba7bda;
$custom-dark: #000000;
JSON
{
  "hex": "#9840c9",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 201
  },
  "hsl": {
    "h": 278.54,
    "s": 55.918,
    "l": 51.961
  },
  "oklch": {
    "l": 0.55186,
    "c": 0.20806,
    "h": 310.8
  },
  "luminance": 0.14559
}

Semantic roles & 50–950 ramp

primary
#9840C9
secondary
#AAD094
accent
#DF497E
background
#FBF7FD
surface
#F7EEFB
border
#D0C9D4
text
#120A15
muted
#817C83

Preview Lab

Preview with #9840C9

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

Preview Lab → · Contrast checker → · Palette generator →

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