#9F40D2#9F40D2

#9F40D2 is a mid, highly saturated violet. Relative luminance 0.157; OKLCH L 56.7% C 0.219 H 311.1°. Best body text is #FFFFFF at 5.07:1 contrast (WCAG AA passes).

Color values

HEX#9F40D2
RGBrgb(159, 64, 210)
HSLhsl(279, 62%, 54%)
HSVhsv(279, 70%, 82%)
CMYKcmyk(24.3%, 69.5%, 0%, 17.6%)
CIE-LABlab(46.57, 62.06, -58.36)
CIE-LCHlch(46.57, 85.19, 316.76°)
OKLaboklab(56.68% 0.1441 -0.165)
OKLCHoklch(56.68% 0.219 311.1)
XYZxyz(27.7621, 15.6915, 62.5266)
Luminance0.1569 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9F40D2 #73D240
analogous
#5640D2 #9F40D2 #D240BC
triadic
#9F40D2 #D29F40 #40D29F
tetradic
#9F40D2 #D25640 #73D240 #40BCD2
square
#9F40D2 #D25640 #73D240 #40BCD2
split-complementary
#9F40D2 #BCD240 #40D256
monochromatic
#5A1D7B #7E29AC #9F40D2 #B872DE #D1A3E9

Accessibility & contrast

On white

5.07
#9F40D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.14
#9F40D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9F40D2
5.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9F40D2#FFFFFF#000000##FFFFFF
##9F40D21.005.074.145.07
#FFFFFF5.071.0021.001.00
#0000004.1421.001.0021.00
##FFFFFF5.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006AD6
Deuteranopia (green-blind)
#2B70CF
Tritanopia (blue-blind)
#985F85
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #9f40d2;
/* rgb */ color: rgb(159, 64, 210);
/* oklch */ color: oklch(56.7% 0.219 311.1);
Tailwind
colors: {
  custom: {
    50: '#c07ce1',
    500: '#9f40d2',
    950: '#000000',
  },
}
SCSS
$custom: #9f40d2;
$custom-light: #c07ce1;
$custom-dark: #000000;
JSON
{
  "hex": "#9f40d2",
  "rgb": {
    "r": 159,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 279.041,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.56676,
    "c": 0.21903,
    "h": 311.1
  },
  "luminance": 0.15691
}

Semantic roles & 50–950 ramp

primary
#9F40D2
secondary
#ADD698
accent
#E5437B
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#130A15
muted
#827C83

Preview Lab

Preview with #9F40D2

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

Preview Lab → · Contrast checker → · Palette generator →

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