#401E8B#401E8B

#401E8B is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.8% C 0.166 H 289.4°. Best body text is #FFFFFF at 11.82:1 contrast (WCAG AA passes).

Color values

HEX#401E8B
RGBrgb(64, 30, 139)
HSLhsl(259, 64%, 33%)
HSVhsv(259, 78%, 55%)
CMYKcmyk(54%, 78.4%, 0%, 45.5%)
CIE-LABlab(23.28, 42.62, -54.40)
CIE-LCHlch(23.28, 69.11, 308.08°)
OKLaboklab(35.78% 0.0551 -0.1564)
OKLCHoklch(35.78% 0.166 289.4)
XYZxyz(7.2375, 3.8823, 24.7891)
Luminance0.0388 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401E8B #698B1E
analogous
#1E328B #401E8B #761E8B
triadic
#401E8B #8B401E #1E8B40
tetradic
#401E8B #8B1E32 #698B1E #1E8B76
square
#401E8B #8B1E32 #698B1E #1E8B76
split-complementary
#401E8B #8B761E #328B1E
monochromatic
#120826 #291359 #401E8B #5729BD #774BD8

Accessibility & contrast

On white

11.82
#401E8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.78
#401E8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401E8B
11.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401E8B#FFFFFF#000000##FFFFFF
##401E8B1.0011.821.7811.82
#FFFFFF11.821.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8E
Deuteranopia (green-blind)
#003589
Tritanopia (blue-blind)
#233D54
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #401e8b;
/* rgb */ color: rgb(64, 30, 139);
/* oklch */ color: oklch(35.8% 0.166 289.4);
Tailwind
colors: {
  custom: {
    50: '#7e5eae',
    500: '#401e8b',
    950: '#000000',
  },
}
SCSS
$custom: #401e8b;
$custom-light: #7e5eae;
$custom-dark: #000000;
JSON
{
  "hex": "#401e8b",
  "rgb": {
    "r": 64,
    "g": 30,
    "b": 139
  },
  "hsl": {
    "h": 258.716,
    "s": 64.497,
    "l": 33.137
  },
  "oklch": {
    "l": 0.35781,
    "c": 0.16582,
    "h": 289.4
  },
  "luminance": 0.03883
}

Semantic roles & 50–950 ramp

primary
#401E8B
secondary
#98BB4A
accent
#E740B3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #401E8B

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

Preview Lab → · Contrast checker → · Palette generator →

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