#9840D7#9840D7

#9840D7 is a mid, highly saturated violet. Relative luminance 0.152; OKLCH L 56.2% C 0.222 H 307.3°. Best body text is #FFFFFF at 5.19:1 contrast (WCAG AA passes).

Color values

HEX#9840D7
RGBrgb(152, 64, 215)
HSLhsl(275, 65%, 55%)
HSVhsv(275, 70%, 84%)
CMYKcmyk(29.3%, 70.2%, 0%, 15.7%)
CIE-LABlab(45.97, 61.74, -62.24)
CIE-LCHlch(45.97, 87.67, 314.77°)
OKLaboklab(56.16% 0.1344 -0.1766)
OKLCHoklch(56.16% 0.222 307.3)
XYZxyz(27.0454, 15.2488, 65.7954)
Luminance0.1525 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840D7 #7FD740
analogous
#4D40D7 #9840D7 #D740CA
triadic
#9840D7 #D79840 #40D798
tetradic
#9840D7 #D74D40 #7FD740 #40CAD7
square
#9840D7 #D74D40 #7FD740 #40CAD7
split-complementary
#9840D7 #CAD740 #40D74D
monochromatic
#571B81 #7926B4 #9840D7 #B373E2 #CFA5EC

Accessibility & contrast

On white

5.19
#9840D7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.05
#9840D7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840D7
5.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840D7#FFFFFF#000000##FFFFFF
##9840D71.005.194.055.19
#FFFFFF5.191.0021.001.00
#0000004.0521.001.0021.00
##FFFFFF5.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ADB
Deuteranopia (green-blind)
#0E6ED4
Tritanopia (blue-blind)
#8E6287
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #9840d7;
/* rgb */ color: rgb(152, 64, 215);
/* oklch */ color: oklch(56.2% 0.222 307.3);
Tailwind
colors: {
  custom: {
    50: '#bb7ce4',
    500: '#9840d7',
    950: '#000000',
  },
}
SCSS
$custom: #9840d7;
$custom-light: #bb7ce4;
$custom-dark: #000000;
JSON
{
  "hex": "#9840d7",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 215
  },
  "hsl": {
    "h": 274.967,
    "s": 65.368,
    "l": 54.706
  },
  "oklch": {
    "l": 0.56163,
    "c": 0.2219,
    "h": 307.3
  },
  "luminance": 0.15248
}

Semantic roles & 50–950 ramp

primary
#9840D7
secondary
#B4D99A
accent
#E83F86
background
#FCF7FE
surface
#F8EEFC
border
#D1C9D5
text
#120A16
muted
#817C84

Preview Lab

Preview with #9840D7

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

Preview Lab → · Contrast checker → · Palette generator →

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