#9840C7#9840C7

#9840C7 is a mid, highly saturated violet. Relative luminance 0.145; OKLCH L 55.1% C 0.206 H 311.4°. Best body text is #FFFFFF at 5.39:1 contrast (WCAG AA passes).

Color values

HEX#9840C7
RGBrgb(152, 64, 199)
HSLhsl(279, 55%, 52%)
HSVhsv(279, 68%, 78%)
CMYKcmyk(23.6%, 67.8%, 0%, 22%)
CIE-LABlab(44.89, 58.26, -54.76)
CIE-LCHlch(44.89, 79.96, 316.77°)
OKLaboklab(55.05% 0.1363 -0.1546)
OKLCHoklch(55.05% 0.206 311.4)
XYZxyz(25.0892, 14.4663, 55.4924)
Luminance0.1447 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840C7 #6FC740
analogous
#5540C7 #9840C7 #C740B3
triadic
#9840C7 #C79840 #40C798
tetradic
#9840C7 #C75540 #6FC740 #40B3C7
square
#9840C7 #C75540 #6FC740 #40B3C7
split-complementary
#9840C7 #B3C740 #40C755
monochromatic
#52206D #762E9C #9840C7 #B26FD5 #CB9FE3

Accessibility & contrast

On white

5.39
#9840C7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.89
#9840C7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840C7
5.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840C7#FFFFFF#000000##FFFFFF
##9840C71.005.393.895.39
#FFFFFF5.391.0021.001.00
#0000003.8921.001.0021.00
##FFFFFF5.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0066CB
Deuteranopia (green-blind)
#306CC4
Tritanopia (blue-blind)
#925C7F
Achromatopsia (no color)
#6A6A6A

Design tokens & code

CSS
--color: #9840c7;
/* rgb */ color: rgb(152, 64, 199);
/* oklch */ color: oklch(55.1% 0.206 311.4);
Tailwind
colors: {
  custom: {
    50: '#ba7bd9',
    500: '#9840c7',
    950: '#000000',
  },
}
SCSS
$custom: #9840c7;
$custom-light: #ba7bd9;
$custom-dark: #000000;
JSON
{
  "hex": "#9840c7",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 279.111,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.55051,
    "c": 0.20609,
    "h": 311.4
  },
  "luminance": 0.14466
}

Semantic roles & 50–950 ramp

primary
#9840C7
secondary
#A8CF94
accent
#DE4A7D
background
#FBF7FD
surface
#F7EEFA
border
#D0C9D3
text
#120A15
muted
#817C83

Preview Lab

Preview with #9840C7

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

Preview Lab → · Contrast checker → · Palette generator →

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