#401D8C#401D8C

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

Color values

HEX#401D8C
RGBrgb(64, 29, 140)
HSLhsl(259, 66%, 33%)
HSVhsv(259, 79%, 55%)
CMYKcmyk(54.3%, 79.3%, 0%, 45.1%)
CIE-LABlab(23.21, 43.39, -55.14)
CIE-LCHlch(23.21, 70.17, 308.20°)
OKLaboklab(35.76% 0.0556 -0.1585)
OKLCHoklch(35.76% 0.168 289.3)
XYZxyz(7.2860, 3.8618, 25.1674)
Luminance0.0386 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401D8C #698C1D
analogous
#1D318C #401D8C #771D8C
triadic
#401D8C #8C401D #1D8C40
tetradic
#401D8C #8C1D31 #698C1D #1D8C77
square
#401D8C #8C1D31 #698C1D #1D8C77
split-complementary
#401D8C #8C771D #318C1D
monochromatic
#120827 #291259 #401D8C #5728BF #774AD9

Accessibility & contrast

On white

11.85
#401D8C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #401D8C
11.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401D8C#FFFFFF#000000##FFFFFF
##401D8C1.0011.851.7711.85
#FFFFFF11.851.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398F
Deuteranopia (green-blind)
#00358A
Tritanopia (blue-blind)
#233D54
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #401d8c;
/* rgb */ color: rgb(64, 29, 140);
/* oklch */ color: oklch(35.8% 0.168 289.3);
Tailwind
colors: {
  custom: {
    50: '#7e5eaf',
    500: '#401d8c',
    950: '#000000',
  },
}
SCSS
$custom: #401d8c;
$custom-light: #7e5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#401d8c",
  "rgb": {
    "r": 64,
    "g": 29,
    "b": 140
  },
  "hsl": {
    "h": 258.919,
    "s": 65.68,
    "l": 33.137
  },
  "oklch": {
    "l": 0.35762,
    "c": 0.168,
    "h": 289.3
  },
  "luminance": 0.03862
}

Semantic roles & 50–950 ramp

primary
#401D8C
secondary
#98BC49
accent
#E93FB3
background
#F8F5FA
surface
#EFE9F5
border
#CAC5CF
text
#0B0410
muted
#7C797F

Preview Lab

Preview with #401D8C

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

Preview Lab → · Contrast checker → · Palette generator →

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