#401D8A#401D8A

#401D8A is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.6% C 0.166 H 289.8°. Best body text is #FFFFFF at 11.93:1 contrast (WCAG AA passes).

Color values

HEX#401D8A
RGBrgb(64, 29, 138)
HSLhsl(259, 65%, 33%)
HSVhsv(259, 79%, 54%)
CMYKcmyk(53.6%, 79%, 0%, 45.9%)
CIE-LABlab(23.01, 42.82, -54.22)
CIE-LCHlch(23.01, 69.09, 308.30°)
OKLaboklab(35.56% 0.0562 -0.1559)
OKLCHoklch(35.56% 0.166 289.8)
XYZxyz(7.1398, 3.8034, 24.3977)
Luminance0.0380 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401D8A #678A1D
analogous
#1D318A #401D8A #761D8A
triadic
#401D8A #8A401D #1D8A40
tetradic
#401D8A #8A1D31 #678A1D #1D8A76
square
#401D8A #8A1D31 #678A1D #1D8A76
split-complementary
#401D8A #8A761D #318A1D
monochromatic
#110825 #291257 #401D8A #5728BD #7749D9

Accessibility & contrast

On white

11.93
#401D8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#401D8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401D8A
11.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401D8A#FFFFFF#000000##FFFFFF
##401D8A1.0011.931.7611.93
#FFFFFF11.931.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398D
Deuteranopia (green-blind)
#003488
Tritanopia (blue-blind)
#243C53
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #401d8a;
/* rgb */ color: rgb(64, 29, 138);
/* oklch */ color: oklch(35.6% 0.166 289.8);
Tailwind
colors: {
  custom: {
    50: '#7e5ead',
    500: '#401d8a',
    950: '#000000',
  },
}
SCSS
$custom: #401d8a;
$custom-light: #7e5ead;
$custom-dark: #000000;
JSON
{
  "hex": "#401d8a",
  "rgb": {
    "r": 64,
    "g": 29,
    "b": 138
  },
  "hsl": {
    "h": 259.266,
    "s": 65.269,
    "l": 32.745
  },
  "oklch": {
    "l": 0.35563,
    "c": 0.16567,
    "h": 289.8
  },
  "luminance": 0.03804
}

Semantic roles & 50–950 ramp

primary
#401D8A
secondary
#96BB48
accent
#E840B2
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0B0410
muted
#7C797F

Preview Lab

Preview with #401D8A

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

Preview Lab → · Contrast checker → · Palette generator →

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