#401D8B#401D8B

#401D8B is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.7% C 0.167 H 289.6°. Best body text is #FFFFFF at 11.89:1 contrast (WCAG AA passes).

Color values

HEX#401D8B
RGBrgb(64, 29, 139)
HSLhsl(259, 65%, 33%)
HSVhsv(259, 79%, 55%)
CMYKcmyk(54%, 79.1%, 0%, 45.5%)
CIE-LABlab(23.11, 43.11, -54.68)
CIE-LCHlch(23.11, 69.63, 308.25°)
OKLaboklab(35.66% 0.0559 -0.1572)
OKLCHoklch(35.66% 0.167 289.6)
XYZxyz(7.2126, 3.8325, 24.7808)
Luminance0.0383 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401D8B #688B1D
analogous
#1D318B #401D8B #771D8B
triadic
#401D8B #8B401D #1D8B40
tetradic
#401D8B #8B1D31 #688B1D #1D8B77
square
#401D8B #8B1D31 #688B1D #1D8B77
split-complementary
#401D8B #8B771D #318B1D
monochromatic
#110826 #291258 #401D8B #5728BE #7749D9

Accessibility & contrast

On white

11.89
#401D8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#401D8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401D8B
11.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401D8B#FFFFFF#000000##FFFFFF
##401D8B1.0011.891.7711.89
#FFFFFF11.891.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.891.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #401d8b;
/* rgb */ color: rgb(64, 29, 139);
/* oklch */ color: oklch(35.7% 0.167 289.6);
Tailwind
colors: {
  custom: {
    50: '#7e5eae',
    500: '#401d8b',
    950: '#000000',
  },
}
SCSS
$custom: #401d8b;
$custom-light: #7e5eae;
$custom-dark: #000000;
JSON
{
  "hex": "#401d8b",
  "rgb": {
    "r": 64,
    "g": 29,
    "b": 139
  },
  "hsl": {
    "h": 259.091,
    "s": 65.476,
    "l": 32.941
  },
  "oklch": {
    "l": 0.35663,
    "c": 0.16684,
    "h": 289.6
  },
  "luminance": 0.03833
}

Semantic roles & 50–950 ramp

primary
#401D8B
secondary
#97BB49
accent
#E83FB3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0B0410
muted
#7C797F

Preview Lab

Preview with #401D8B

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

Preview Lab → · Contrast checker → · Palette generator →

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