#40159F#40159F

#40159F is a dark, vivid violet. Relative luminance 0.041; OKLCH L 37.0% C 0.196 H 285.9°. Best body text is #FFFFFF at 11.50:1 contrast (WCAG AA passes).

Color values

HEX#40159F
RGBrgb(64, 21, 159)
HSLhsl(259, 77%, 35%)
HSVhsv(259, 87%, 62%)
CMYKcmyk(59.7%, 86.8%, 0%, 37.6%)
CIE-LABlab(24.09, 51.99, -65.40)
CIE-LCHlch(24.09, 83.55, 308.48°)
OKLaboklab(36.97% 0.0536 -0.1884)
OKLCHoklch(36.97% 0.196 285.9)
XYZxyz(8.6386, 4.1290, 33.1359)
Luminance0.0413 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40159F #749F15
analogous
#152F9F #40159F #85159F
triadic
#40159F #9F4015 #159F40
tetradic
#40159F #9F152F #749F15 #159F85
square
#40159F #9F152F #749F15 #159F85
split-complementary
#40159F #9F8515 #2F9F15
monochromatic
#140733 #2A0E69 #40159F #561CD5 #7948E7

Accessibility & contrast

On white

11.50
#40159F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#40159F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40159F
11.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40159F#FFFFFF#000000##FFFFFF
##40159F1.0011.501.8311.50
#FFFFFF11.501.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003DA3
Deuteranopia (green-blind)
#00359D
Tritanopia (blue-blind)
#06425E
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40159f;
/* rgb */ color: rgb(64, 21, 159);
/* oklch */ color: oklch(37.0% 0.196 285.9);
Tailwind
colors: {
  custom: {
    50: '#825bbd',
    500: '#40159f',
    950: '#000000',
  },
}
SCSS
$custom: #40159f;
$custom-light: #825bbd;
$custom-dark: #000000;
JSON
{
  "hex": "#40159f",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 159
  },
  "hsl": {
    "h": 258.696,
    "s": 76.667,
    "l": 35.294
  },
  "oklch": {
    "l": 0.36974,
    "c": 0.19589,
    "h": 285.9
  },
  "luminance": 0.0413
}

Semantic roles & 50–950 ramp

primary
#40159F
secondary
#A0C848
accent
#F335B8
background
#F8F5FB
surface
#F0E9F7
border
#CBC5D0
text
#0C0412
muted
#7D7981

Preview Lab

Preview with #40159F

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

Preview Lab → · Contrast checker → · Palette generator →

#40159F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva