#9840DF#9840DF

#9840DF is a mid, highly saturated violet. Relative luminance 0.157; OKLCH L 56.7% C 0.230 H 305.4°. Best body text is #FFFFFF at 5.08:1 contrast (WCAG AA passes).

Color values

HEX#9840DF
RGBrgb(152, 64, 223)
HSLhsl(273, 71%, 56%)
HSVhsv(273, 71%, 87%)
CMYKcmyk(31.8%, 71.3%, 0%, 12.5%)
CIE-LABlab(46.54, 63.52, -65.88)
CIE-LCHlch(46.54, 91.52, 313.95°)
OKLaboklab(56.74% 0.1332 -0.1873)
OKLCHoklch(56.74% 0.23 305.4)
XYZxyz(28.0986, 15.6701, 71.3421)
Luminance0.1567 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840DF #87DF40
analogous
#4940DF #9840DF #DF40D6
triadic
#9840DF #DF9840 #40DF98
tetradic
#9840DF #DF4940 #87DF40 #40D6DF
square
#9840DF #DF4940 #87DF40 #40D6DF
split-complementary
#9840DF #D6DF40 #40DF49
monochromatic
#59188D #7A20C1 #9840DF #B474E8 #D1A9F1

Accessibility & contrast

On white

5.08
#9840DF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.13
#9840DF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840DF
5.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840DF#FFFFFF#000000##FFFFFF
##9840DF1.005.084.135.08
#FFFFFF5.081.0021.001.00
#0000004.1321.001.0021.00
##FFFFFF5.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006CE4
Deuteranopia (green-blind)
#006EDC
Tritanopia (blue-blind)
#8B668C
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #9840df;
/* rgb */ color: rgb(152, 64, 223);
/* oklch */ color: oklch(56.7% 0.230 305.4);
Tailwind
colors: {
  custom: {
    50: '#bc7cea',
    500: '#9840df',
    950: '#000000',
  },
}
SCSS
$custom: #9840df;
$custom-light: #bc7cea;
$custom-dark: #000000;
JSON
{
  "hex": "#9840df",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 223
  },
  "hsl": {
    "h": 273.208,
    "s": 71.3,
    "l": 56.275
  },
  "oklch": {
    "l": 0.56743,
    "c": 0.2298,
    "h": 305.4
  },
  "luminance": 0.1567
}

Semantic roles & 50–950 ramp

primary
#9840DF
secondary
#BADE9D
accent
#EE3A8A
background
#FCF7FE
surface
#F8EEFD
border
#D1C9D5
text
#130A16
muted
#827C84

Preview Lab

Preview with #9840DF

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

Preview Lab → · Contrast checker → · Palette generator →

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