#9E40D9#9E40D9

#9E40D9 is a mid, highly saturated violet. Relative luminance 0.159; OKLCH L 57.0% C 0.225 H 309.0°. Best body text is #FFFFFF at 5.01:1 contrast (WCAG AA passes).

Color values

HEX#9E40D9
RGBrgb(158, 64, 217)
HSLhsl(277, 67%, 55%)
HSVhsv(277, 71%, 85%)
CMYKcmyk(27.2%, 70.5%, 0%, 14.9%)
CIE-LABlab(46.90, 63.35, -61.84)
CIE-LCHlch(46.90, 88.53, 315.69°)
OKLaboklab(57.04% 0.1419 -0.1752)
OKLCHoklch(57.04% 0.225 309)
XYZxyz(28.4558, 15.9462, 67.2111)
Luminance0.1595 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9E40D9 #7BD940
analogous
#5240D9 #9E40D9 #D940C7
triadic
#9E40D9 #D99E40 #40D99E
tetradic
#9E40D9 #D95240 #7BD940 #40C7D9
square
#9E40D9 #D95240 #7BD940 #40C7D9
split-complementary
#9E40D9 #C7D940 #40D952
monochromatic
#5B1A84 #7F24B7 #9E40D9 #B873E3 #D2A6ED

Accessibility & contrast

On white

5.01
#9E40D9 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.19
#9E40D9 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9E40D9
5.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9E40D9#FFFFFF#000000##FFFFFF
##9E40D91.005.014.195.01
#FFFFFF5.011.0021.001.00
#0000004.1921.001.0021.00
##FFFFFF5.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BDD
Deuteranopia (green-blind)
#1C70D6
Tritanopia (blue-blind)
#956288
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #9e40d9;
/* rgb */ color: rgb(158, 64, 217);
/* oklch */ color: oklch(57.0% 0.225 309.0);
Tailwind
colors: {
  custom: {
    50: '#bf7de6',
    500: '#9e40d9',
    950: '#000000',
  },
}
SCSS
$custom: #9e40d9;
$custom-light: #bf7de6;
$custom-dark: #000000;
JSON
{
  "hex": "#9e40d9",
  "rgb": {
    "r": 158,
    "g": 64,
    "b": 217
  },
  "hsl": {
    "h": 276.863,
    "s": 66.812,
    "l": 55.098
  },
  "oklch": {
    "l": 0.57037,
    "c": 0.22548,
    "h": 309
  },
  "luminance": 0.15946
}

Semantic roles & 50–950 ramp

primary
#9E40D9
secondary
#B3DA9A
accent
#EA3E80
background
#FCF7FE
surface
#F8EEFC
border
#D1C9D5
text
#130A16
muted
#827C84

Preview Lab

Preview with #9E40D9

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

Preview Lab → · Contrast checker → · Palette generator →

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