#9D40CC#9D40CC

#9D40CC is a mid, highly saturated violet. Relative luminance 0.152; OKLCH L 56.0% C 0.213 H 312.0°. Best body text is #FFFFFF at 5.20:1 contrast (WCAG AA passes).

Color values

HEX#9D40CC
RGBrgb(157, 64, 204)
HSLhsl(280, 58%, 53%)
HSVhsv(280, 69%, 80%)
CMYKcmyk(23%, 68.6%, 0%, 20%)
CIE-LABlab(45.90, 60.38, -56.00)
CIE-LCHlch(45.90, 82.35, 317.16°)
OKLaboklab(56.02% 0.1422 -0.1581)
OKLCHoklch(56.02% 0.213 312)
XYZxyz(26.6351, 15.1952, 58.6449)
Luminance0.1520 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9D40CC #6FCC40
analogous
#5740CC #9D40CC #CC40B5
triadic
#9D40CC #CC9D40 #40CC9D
tetradic
#9D40CC #CC5740 #6FCC40 #40B5CC
square
#9D40CC #CC5740 #6FCC40 #40B5CC
split-complementary
#9D40CC #B5CC40 #40CC57
monochromatic
#571F73 #7B2CA3 #9D40CC #B670D9 #CFA1E6

Accessibility & contrast

On white

5.20
#9D40CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.04
#9D40CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9D40CC
5.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9D40CC#FFFFFF#000000##FFFFFF
##9D40CC1.005.204.045.20
#FFFFFF5.201.0021.001.00
#0000004.0421.001.0021.00
##FFFFFF5.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0068D0
Deuteranopia (green-blind)
#316FC9
Tritanopia (blue-blind)
#975D81
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #9d40cc;
/* rgb */ color: rgb(157, 64, 204);
/* oklch */ color: oklch(56.0% 0.213 312.0);
Tailwind
colors: {
  custom: {
    50: '#be7cdc',
    500: '#9d40cc',
    950: '#000000',
  },
}
SCSS
$custom: #9d40cc;
$custom-light: #be7cdc;
$custom-dark: #000000;
JSON
{
  "hex": "#9d40cc",
  "rgb": {
    "r": 157,
    "g": 64,
    "b": 204
  },
  "hsl": {
    "h": 279.857,
    "s": 57.851,
    "l": 52.549
  },
  "oklch": {
    "l": 0.56017,
    "c": 0.21261,
    "h": 312
  },
  "luminance": 0.15195
}

Semantic roles & 50–950 ramp

primary
#9D40CC
secondary
#AAD295
accent
#E1477B
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#130A15
muted
#827C83

Preview Lab

Preview with #9D40CC

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

Preview Lab → · Contrast checker → · Palette generator →

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