#9E40D4#9E40D4

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

Color values

HEX#9E40D4
RGBrgb(158, 64, 212)
HSLhsl(278, 63%, 54%)
HSVhsv(278, 70%, 83%)
CMYKcmyk(25.5%, 69.8%, 0%, 16.9%)
CIE-LABlab(46.57, 62.28, -59.52)
CIE-LCHlch(46.57, 86.15, 316.30°)
OKLaboklab(56.69% 0.1426 -0.1684)
OKLCHoklch(56.69% 0.221 310.3)
XYZxyz(27.8153, 15.6900, 63.8378)
Luminance0.1569 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9E40D4 #76D440
analogous
#5440D4 #9E40D4 #D440C0
triadic
#9E40D4 #D49E40 #40D49E
tetradic
#9E40D4 #D45440 #76D440 #40C0D4
square
#9E40D4 #D45440 #76D440 #40C0D4
split-complementary
#9E40D4 #C0D440 #40D454
monochromatic
#5A1C7D #7E27AF #9E40D4 #B772DF #D1A4EA

Accessibility & contrast

On white

5.08
#9E40D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.14
#9E40D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9E40D4
5.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9E40D4#FFFFFF#000000##FFFFFF
##9E40D41.005.084.145.08
#FFFFFF5.081.0021.001.00
#0000004.1421.001.0021.00
##FFFFFF5.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006AD8
Deuteranopia (green-blind)
#2670D1
Tritanopia (blue-blind)
#976086
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #9e40d4;
/* rgb */ color: rgb(158, 64, 212);
/* oklch */ color: oklch(56.7% 0.221 310.3);
Tailwind
colors: {
  custom: {
    50: '#bf7ce2',
    500: '#9e40d4',
    950: '#000000',
  },
}
SCSS
$custom: #9e40d4;
$custom-light: #bf7ce2;
$custom-dark: #000000;
JSON
{
  "hex": "#9e40d4",
  "rgb": {
    "r": 158,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 278.108,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.56688,
    "c": 0.22065,
    "h": 310.3
  },
  "luminance": 0.15689
}

Semantic roles & 50–950 ramp

primary
#9E40D4
secondary
#AFD798
accent
#E6427E
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#130A15
muted
#827C83

Preview Lab

Preview with #9E40D4

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

Preview Lab → · Contrast checker → · Palette generator →

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