#9F40D5#9F40D5

#9F40D5 is a mid, highly saturated violet. Relative luminance 0.158; OKLCH L 56.9% C 0.222 H 310.4°. Best body text is #FFFFFF at 5.04:1 contrast (WCAG AA passes).

Color values

HEX#9F40D5
RGBrgb(159, 64, 213)
HSLhsl(278, 64%, 54%)
HSVhsv(278, 70%, 84%)
CMYKcmyk(25.4%, 70%, 0%, 16.5%)
CIE-LABlab(46.77, 62.70, -59.76)
CIE-LCHlch(46.77, 86.62, 316.37°)
OKLaboklab(56.88% 0.1437 -0.1691)
OKLCHoklch(56.88% 0.222 310.4)
XYZxyz(28.1394, 15.8424, 64.5134)
Luminance0.1584 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9F40D5 #76D540
analogous
#5540D5 #9F40D5 #D540C1
triadic
#9F40D5 #D59F40 #40D59F
tetradic
#9F40D5 #D55540 #76D540 #40C1D5
square
#9F40D5 #D55540 #76D540 #40C1D5
split-complementary
#9F40D5 #C1D540 #40D555
monochromatic
#5B1C7F #7F27B1 #9F40D5 #B872E0 #D1A4EB

Accessibility & contrast

On white

5.04
#9F40D5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.17
#9F40D5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9F40D5
5.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9F40D5#FFFFFF#000000##FFFFFF
##9F40D51.005.044.175.04
#FFFFFF5.041.0021.001.00
#0000004.1721.001.0021.00
##FFFFFF5.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BD9
Deuteranopia (green-blind)
#2670D2
Tritanopia (blue-blind)
#986186
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #9f40d5;
/* rgb */ color: rgb(159, 64, 213);
/* oklch */ color: oklch(56.9% 0.222 310.4);
Tailwind
colors: {
  custom: {
    50: '#c07de3',
    500: '#9f40d5',
    950: '#000000',
  },
}
SCSS
$custom: #9f40d5;
$custom-light: #c07de3;
$custom-dark: #000000;
JSON
{
  "hex": "#9f40d5",
  "rgb": {
    "r": 159,
    "g": 64,
    "b": 213
  },
  "hsl": {
    "h": 278.255,
    "s": 63.948,
    "l": 54.314
  },
  "oklch": {
    "l": 0.56882,
    "c": 0.22191,
    "h": 310.4
  },
  "luminance": 0.15842
}

Semantic roles & 50–950 ramp

primary
#9F40D5
secondary
#B0D899
accent
#E7417D
background
#FCF7FE
surface
#F8EEFC
border
#D1C9D5
text
#130A15
muted
#827C84

Preview Lab

Preview with #9F40D5

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

Preview Lab → · Contrast checker → · Palette generator →

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