#401D8D#401D8D

#401D8D is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.9% C 0.169 H 289.1°. Best body text is #FFFFFF at 11.81:1 contrast (WCAG AA passes).

Color values

HEX#401D8D
RGBrgb(64, 29, 141)
HSLhsl(259, 66%, 33%)
HSVhsv(259, 79%, 55%)
CMYKcmyk(54.6%, 79.4%, 0%, 44.7%)
CIE-LABlab(23.31, 43.68, -55.60)
CIE-LCHlch(23.31, 70.70, 308.15°)
OKLaboklab(35.86% 0.0552 -0.1599)
OKLCHoklch(35.86% 0.169 289.1)
XYZxyz(7.3600, 3.8915, 25.5575)
Luminance0.0389 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401D8D #6A8D1D
analogous
#1D328D #401D8D #781D8D
triadic
#401D8D #8D401D #1D8D40
tetradic
#401D8D #8D1D32 #6A8D1D #1D8D78
square
#401D8D #8D1D32 #6A8D1D #1D8D78
split-complementary
#401D8D #8D781D #328D1D
monochromatic
#120827 #29135A #401D8D #5727C0 #774BDA

Accessibility & contrast

On white

11.81
#401D8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #401D8D
11.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401D8D#FFFFFF#000000##FFFFFF
##401D8D1.0011.811.7811.81
#FFFFFF11.811.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A90
Deuteranopia (green-blind)
#00358B
Tritanopia (blue-blind)
#223D54
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #401d8d;
/* rgb */ color: rgb(64, 29, 141);
/* oklch */ color: oklch(35.9% 0.169 289.1);
Tailwind
colors: {
  custom: {
    50: '#7e5eaf',
    500: '#401d8d',
    950: '#000000',
  },
}
SCSS
$custom: #401d8d;
$custom-light: #7e5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#401d8d",
  "rgb": {
    "r": 64,
    "g": 29,
    "b": 141
  },
  "hsl": {
    "h": 258.75,
    "s": 65.882,
    "l": 33.333
  },
  "oklch": {
    "l": 0.35862,
    "c": 0.16916,
    "h": 289.1
  },
  "luminance": 0.03892
}

Semantic roles & 50–950 ramp

primary
#401D8D
secondary
#98BC4A
accent
#E93FB4
background
#F8F5FA
surface
#EFE9F5
border
#CAC5CF
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #401D8D

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

Preview Lab → · Contrast checker → · Palette generator →

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