#9D40C8#9D40C8

#9D40C8 is a mid, highly saturated purple. Relative luminance 0.150; OKLCH L 55.8% C 0.209 H 313.1°. Best body text is #FFFFFF at 5.25:1 contrast (WCAG AA passes).

Color values

HEX#9D40C8
RGBrgb(157, 64, 200)
HSLhsl(281, 55%, 52%)
HSVhsv(281, 68%, 78%)
CMYKcmyk(21.5%, 68%, 0%, 21.6%)
CIE-LABlab(45.64, 59.55, -54.10)
CIE-LCHlch(45.64, 80.46, 317.74°)
OKLaboklab(55.75% 0.1425 -0.1525)
OKLCHoklch(55.75% 0.209 313.1)
XYZxyz(26.1615, 15.0058, 56.1507)
Luminance0.1500 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9D40C8 #6BC840
analogous
#5940C8 #9D40C8 #C840AF
triadic
#9D40C8 #C89D40 #40C89D
tetradic
#9D40C8 #C85940 #6BC840 #40AFC8
square
#9D40C8 #C85940 #6BC840 #40AFC8
split-complementary
#9D40C8 #AFC840 #40C859
monochromatic
#55206E #7A2D9D #9D40C8 #B570D6 #CE9FE3

Accessibility & contrast

On white

5.25
#9D40C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.00
#9D40C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9D40C8
5.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9D40C8#FFFFFF#000000##FFFFFF
##9D40C81.005.254.005.25
#FFFFFF5.251.0021.001.00
#0000004.0021.001.0021.00
##FFFFFF5.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0067CC
Deuteranopia (green-blind)
#366EC5
Tritanopia (blue-blind)
#985C7F
Achromatopsia (no color)
#6C6C6C

Design tokens & code

CSS
--color: #9d40c8;
/* rgb */ color: rgb(157, 64, 200);
/* oklch */ color: oklch(55.8% 0.209 313.1);
Tailwind
colors: {
  custom: {
    50: '#be7cd9',
    500: '#9d40c8',
    950: '#000000',
  },
}
SCSS
$custom: #9d40c8;
$custom-light: #be7cd9;
$custom-dark: #000000;
JSON
{
  "hex": "#9d40c8",
  "rgb": {
    "r": 157,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 281.029,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.5575,
    "c": 0.20876,
    "h": 313.1
  },
  "luminance": 0.15005
}

Semantic roles & 50–950 ramp

primary
#9D40C8
secondary
#A7D094
accent
#DF4978
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#130A15
muted
#827C83

Preview Lab

Preview with #9D40C8

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

Preview Lab → · Contrast checker → · Palette generator →

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