#9D40C9#9D40C9

#9D40C9 is a mid, highly saturated purple. Relative luminance 0.151; OKLCH L 55.8% C 0.210 H 312.8°. Best body text is #FFFFFF at 5.24:1 contrast (WCAG AA passes).

Color values

HEX#9D40C9
RGBrgb(157, 64, 201)
HSLhsl(281, 56%, 52%)
HSVhsv(281, 68%, 79%)
CMYKcmyk(21.9%, 68.2%, 0%, 21.2%)
CIE-LABlab(45.71, 59.76, -54.58)
CIE-LCHlch(45.71, 80.93, 317.59°)
OKLaboklab(55.82% 0.1424 -0.1539)
OKLCHoklch(55.82% 0.21 312.8)
XYZxyz(26.2788, 15.0527, 56.7682)
Luminance0.1505 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9D40C9 #6CC940
analogous
#5940C9 #9D40C9 #C940B0
triadic
#9D40C9 #C99D40 #40C99D
tetradic
#9D40C9 #C95940 #6CC940 #40B0C9
square
#9D40C9 #C95940 #6CC940 #40B0C9
split-complementary
#9D40C9 #B0C940 #40C959
monochromatic
#561F6F #7A2D9F #9D40C9 #B570D6 #CE9FE4

Accessibility & contrast

On white

5.24
#9D40C9 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.01
#9D40C9 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9D40C9
5.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9D40C9#FFFFFF#000000##FFFFFF
##9D40C91.005.244.015.24
#FFFFFF5.241.0021.001.00
#0000004.0121.001.0021.00
##FFFFFF5.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0067CD
Deuteranopia (green-blind)
#346EC6
Tritanopia (blue-blind)
#985C80
Achromatopsia (no color)
#6C6C6C

Design tokens & code

CSS
--color: #9d40c9;
/* rgb */ color: rgb(157, 64, 201);
/* oklch */ color: oklch(55.8% 0.210 312.8);
Tailwind
colors: {
  custom: {
    50: '#be7cda',
    500: '#9d40c9',
    950: '#000000',
  },
}
SCSS
$custom: #9d40c9;
$custom-light: #be7cda;
$custom-dark: #000000;
JSON
{
  "hex": "#9d40c9",
  "rgb": {
    "r": 157,
    "g": 64,
    "b": 201
  },
  "hsl": {
    "h": 280.73,
    "s": 55.918,
    "l": 51.961
  },
  "oklch": {
    "l": 0.55817,
    "c": 0.20972,
    "h": 312.8
  },
  "luminance": 0.15052
}

Semantic roles & 50–950 ramp

primary
#9D40C9
secondary
#A8D094
accent
#DF4979
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#130A15
muted
#827C83

Preview Lab

Preview with #9D40C9

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

Preview Lab → · Contrast checker → · Palette generator →

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