#401D87#401D87

#401D87 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.3% C 0.162 H 290.6°. Best body text is #FFFFFF at 12.04:1 contrast (WCAG AA passes).

Color values

HEX#401D87
RGBrgb(64, 29, 135)
HSLhsl(260, 65%, 32%)
HSVhsv(260, 79%, 53%)
CMYKcmyk(52.6%, 78.5%, 0%, 47.1%)
CIE-LABlab(22.72, 41.96, -52.82)
CIE-LCHlch(22.72, 67.46, 308.46°)
OKLaboklab(35.27% 0.0571 -0.1518)
OKLCHoklch(35.27% 0.162 290.6)
XYZxyz(6.9256, 3.7177, 23.2696)
Luminance0.0372 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401D87 #64871D
analogous
#1D2F87 #401D87 #751D87
triadic
#401D87 #87401D #1D8740
tetradic
#401D87 #871D2F #64871D #1D8775
square
#401D87 #871D2F #64871D #1D8775
split-complementary
#401D87 #87751D #2F871D
monochromatic
#100722 #281255 #401D87 #5828B9 #7747D7

Accessibility & contrast

On white

12.04
#401D87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#401D87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401D87
12.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401D87#FFFFFF#000000##FFFFFF
##401D871.0012.041.7412.04
#FFFFFF12.041.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388A
Deuteranopia (green-blind)
#003485
Tritanopia (blue-blind)
#273B51
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #401d87;
/* rgb */ color: rgb(64, 29, 135);
/* oklch */ color: oklch(35.3% 0.162 290.6);
Tailwind
colors: {
  custom: {
    50: '#7d5dab',
    500: '#401d87',
    950: '#000000',
  },
}
SCSS
$custom: #401d87;
$custom-light: #7d5dab;
$custom-dark: #000000;
JSON
{
  "hex": "#401d87",
  "rgb": {
    "r": 64,
    "g": 29,
    "b": 135
  },
  "hsl": {
    "h": 259.811,
    "s": 64.634,
    "l": 32.157
  },
  "oklch": {
    "l": 0.35267,
    "c": 0.16215,
    "h": 290.6
  },
  "luminance": 0.03718
}

Semantic roles & 50–950 ramp

primary
#401D87
secondary
#93B946
accent
#E840B0
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0B0410
muted
#7C797F

Preview Lab

Preview with #401D87

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

Preview Lab → · Contrast checker → · Palette generator →

#401D87 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva