#9840C8#9840C8

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

Color values

HEX#9840C8
RGBrgb(152, 64, 200)
HSLhsl(279, 55%, 52%)
HSVhsv(279, 68%, 78%)
CMYKcmyk(24%, 68%, 0%, 21.6%)
CIE-LABlab(44.96, 58.48, -55.24)
CIE-LCHlch(44.96, 80.44, 316.63°)
OKLaboklab(55.12% 0.1362 -0.156)
OKLCHoklch(55.12% 0.207 311.1)
XYZxyz(25.2057, 14.5129, 56.1059)
Luminance0.1451 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840C8 #70C840
analogous
#5440C8 #9840C8 #C840B4
triadic
#9840C8 #C89840 #40C898
tetradic
#9840C8 #C85440 #70C840 #40B4C8
square
#9840C8 #C85440 #70C840 #40B4C8
split-complementary
#9840C8 #B4C840 #40C854
monochromatic
#52206E #762D9D #9840C8 #B270D6 #CB9FE3

Accessibility & contrast

On white

5.38
#9840C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.90
#9840C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840C8
5.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840C8#FFFFFF#000000##FFFFFF
##9840C81.005.383.905.38
#FFFFFF5.381.0021.001.00
#0000003.9021.001.0021.00
##FFFFFF5.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0066CC
Deuteranopia (green-blind)
#2E6CC5
Tritanopia (blue-blind)
#925D7F
Achromatopsia (no color)
#6A6A6A

Design tokens & code

CSS
--color: #9840c8;
/* rgb */ color: rgb(152, 64, 200);
/* oklch */ color: oklch(55.1% 0.207 311.1);
Tailwind
colors: {
  custom: {
    50: '#ba7bd9',
    500: '#9840c8',
    950: '#000000',
  },
}
SCSS
$custom: #9840c8;
$custom-light: #ba7bd9;
$custom-dark: #000000;
JSON
{
  "hex": "#9840c8",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 278.824,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.55119,
    "c": 0.20708,
    "h": 311.1
  },
  "luminance": 0.14512
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #9840C8

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

Preview Lab → · Contrast checker → · Palette generator →

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