#9D40CB#9D40CB

#9D40CB is a mid, highly saturated purple. Relative luminance 0.151; OKLCH L 56.0% C 0.212 H 312.2°. Best body text is #FFFFFF at 5.21:1 contrast (WCAG AA passes).

Color values

HEX#9D40CB
RGBrgb(157, 64, 203)
HSLhsl(280, 57%, 52%)
HSVhsv(280, 68%, 80%)
CMYKcmyk(22.7%, 68.5%, 0%, 20.4%)
CIE-LABlab(45.84, 60.17, -55.53)
CIE-LCHlch(45.84, 81.88, 317.30°)
OKLaboklab(55.95% 0.1423 -0.1567)
OKLCHoklch(55.95% 0.212 312.2)
XYZxyz(26.5156, 15.1474, 58.0153)
Luminance0.1515 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9D40CB #6ECB40
analogous
#5840CB #9D40CB #CB40B4
triadic
#9D40CB #CB9D40 #40CB9D
tetradic
#9D40CB #CB5840 #6ECB40 #40B4CB
square
#9D40CB #CB5840 #6ECB40 #40B4CB
split-complementary
#9D40CB #B4CB40 #40CB58
monochromatic
#561F72 #7B2CA2 #9D40CB #B670D8 #CEA0E5

Accessibility & contrast

On white

5.21
#9D40CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.03
#9D40CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9D40CB
5.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9D40CB#FFFFFF#000000##FFFFFF
##9D40CB1.005.214.035.21
#FFFFFF5.211.0021.001.00
#0000004.0321.001.0021.00
##FFFFFF5.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0068CF
Deuteranopia (green-blind)
#326EC8
Tritanopia (blue-blind)
#985D81
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #9d40cb;
/* rgb */ color: rgb(157, 64, 203);
/* oklch */ color: oklch(56.0% 0.212 312.2);
Tailwind
colors: {
  custom: {
    50: '#be7cdc',
    500: '#9d40cb',
    950: '#000000',
  },
}
SCSS
$custom: #9d40cb;
$custom-light: #be7cdc;
$custom-dark: #000000;
JSON
{
  "hex": "#9d40cb",
  "rgb": {
    "r": 157,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 280.144,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.5595,
    "c": 0.21164,
    "h": 312.2
  },
  "luminance": 0.15147
}

Semantic roles & 50–950 ramp

primary
#9D40CB
secondary
#A9D295
accent
#E0477A
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#130A15
muted
#827C83

Preview Lab

Preview with #9D40CB

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

Preview Lab → · Contrast checker → · Palette generator →

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