#9E40DB#9E40DB

#9E40DB is a mid, highly saturated violet. Relative luminance 0.161; OKLCH L 57.2% C 0.227 H 308.5°. Best body text is #FFFFFF at 4.99:1 contrast (WCAG AA passes).

Color values

HEX#9E40DB
RGBrgb(158, 64, 219)
HSLhsl(276, 68%, 55%)
HSVhsv(276, 71%, 86%)
CMYKcmyk(27.9%, 70.8%, 0%, 14.1%)
CIE-LABlab(47.04, 63.78, -62.76)
CIE-LCHlch(47.04, 89.48, 315.46°)
OKLaboklab(57.18% 0.1417 -0.1779)
OKLCHoklch(57.18% 0.227 308.5)
XYZxyz(28.7175, 16.0508, 68.5894)
Luminance0.1605 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9E40DB #7DDB40
analogous
#5040DB #9E40DB #DB40CB
triadic
#9E40DB #DB9E40 #40DB9E
tetradic
#9E40DB #DB5040 #7DDB40 #40CBDB
square
#9E40DB #DB5040 #7DDB40 #40CBDB
split-complementary
#9E40DB #CBDB40 #40DB50
monochromatic
#5C1987 #7F23BB #9E40DB #B873E5 #D2A7EE

Accessibility & contrast

On white

4.99
#9E40DB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.21
#9E40DB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9E40DB
4.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9E40DB#FFFFFF#000000##FFFFFF
##9E40DB1.004.994.214.99
#FFFFFF4.991.0021.001.00
#0000004.2121.001.0021.00
##FFFFFF4.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006CDF
Deuteranopia (green-blind)
#1671D8
Tritanopia (blue-blind)
#95638A
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #9e40db;
/* rgb */ color: rgb(158, 64, 219);
/* oklch */ color: oklch(57.2% 0.227 308.5);
Tailwind
colors: {
  custom: {
    50: '#c07de7',
    500: '#9e40db',
    950: '#000000',
  },
}
SCSS
$custom: #9e40db;
$custom-light: #c07de7;
$custom-dark: #000000;
JSON
{
  "hex": "#9e40db",
  "rgb": {
    "r": 158,
    "g": 64,
    "b": 219
  },
  "hsl": {
    "h": 276.387,
    "s": 68.282,
    "l": 55.49
  },
  "oklch": {
    "l": 0.57178,
    "c": 0.22741,
    "h": 308.5
  },
  "luminance": 0.1605
}

Semantic roles & 50–950 ramp

primary
#9E40DB
secondary
#B5DC9B
accent
#EB3D81
background
#FCF7FE
surface
#F8EEFD
border
#D1C9D5
text
#130A16
muted
#827C84

Preview Lab

Preview with #9E40DB

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

Preview Lab → · Contrast checker → · Palette generator →

#9E40DB Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva