#9D40DC#9D40DC

#9D40DC is a mid, highly saturated violet. Relative luminance 0.160; OKLCH L 57.1% C 0.228 H 307.9°. Best body text is #FFFFFF at 5.00:1 contrast (WCAG AA passes).

Color values

HEX#9D40DC
RGBrgb(157, 64, 220)
HSLhsl(276, 69%, 56%)
HSVhsv(276, 71%, 86%)
CMYKcmyk(28.6%, 70.9%, 0%, 13.7%)
CIE-LABlab(46.98, 63.80, -63.43)
CIE-LCHlch(46.98, 89.97, 315.17°)
OKLaboklab(57.13% 0.1402 -0.1799)
OKLCHoklch(57.13% 0.228 307.9)
XYZxyz(28.6536, 16.0026, 69.2756)
Luminance0.1600 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9D40DC #7FDC40
analogous
#4F40DC #9D40DC #DC40CD
triadic
#9D40DC #DC9D40 #40DC9D
tetradic
#9D40DC #DC4F40 #7FDC40 #40CDDC
square
#9D40DC #DC4F40 #7FDC40 #40CDDC
split-complementary
#9D40DC #CDDC40 #40DC4F
monochromatic
#5C1989 #7E23BC #9D40DC #B874E5 #D2A7EF

Accessibility & contrast

On white

5.00
#9D40DC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.20
#9D40DC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9D40DC
5.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9D40DC#FFFFFF#000000##FFFFFF
##9D40DC1.005.004.205.00
#FFFFFF5.001.0021.001.00
#0000004.2021.001.0021.00
##FFFFFF5.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006CE0
Deuteranopia (green-blind)
#0F70D9
Tritanopia (blue-blind)
#93648A
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #9d40dc;
/* rgb */ color: rgb(157, 64, 220);
/* oklch */ color: oklch(57.1% 0.228 307.9);
Tailwind
colors: {
  custom: {
    50: '#bf7de8',
    500: '#9d40dc',
    950: '#000000',
  },
}
SCSS
$custom: #9d40dc;
$custom-light: #bf7de8;
$custom-dark: #000000;
JSON
{
  "hex": "#9d40dc",
  "rgb": {
    "r": 157,
    "g": 64,
    "b": 220
  },
  "hsl": {
    "h": 275.769,
    "s": 69.027,
    "l": 55.686
  },
  "oklch": {
    "l": 0.57127,
    "c": 0.2281,
    "h": 307.9
  },
  "luminance": 0.16002
}

Semantic roles & 50–950 ramp

primary
#9D40DC
secondary
#B6DC9B
accent
#EC3C83
background
#FCF7FE
surface
#F8EEFD
border
#D1C9D5
text
#130A16
muted
#827C84

Preview Lab

Preview with #9D40DC

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

Preview Lab → · Contrast checker → · Palette generator →

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