#401F8D#401F8D

#401F8D is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.1% C 0.167 H 288.7°. Best body text is #FFFFFF at 11.68:1 contrast (WCAG AA passes).

Color values

HEX#401F8D
RGBrgb(64, 31, 141)
HSLhsl(258, 64%, 34%)
HSVhsv(258, 78%, 55%)
CMYKcmyk(54.6%, 78%, 0%, 44.7%)
CIE-LABlab(23.65, 42.71, -55.04)
CIE-LCHlch(23.65, 69.67, 307.81°)
OKLaboklab(36.1% 0.0537 -0.1583)
OKLCHoklch(36.1% 0.167 288.7)
XYZxyz(7.4106, 3.9927, 25.5743)
Luminance0.0399 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401F8D #6C8D1F
analogous
#1F358D #401F8D #771F8D
triadic
#401F8D #8D401F #1F8D40
tetradic
#401F8D #8D1F35 #6C8D1F #1F8D77
square
#401F8D #8D1F35 #6C8D1F #1F8D77
split-complementary
#401F8D #8D771F #358D1F
monochromatic
#120929 #29145B #401F8D #572ABF #784ED8

Accessibility & contrast

On white

11.68
#401F8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#401F8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401F8D
11.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401F8D#FFFFFF#000000##FFFFFF
##401F8D1.0011.681.8011.68
#FFFFFF11.681.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.681.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #401f8d;
/* rgb */ color: rgb(64, 31, 141);
/* oklch */ color: oklch(36.1% 0.167 288.7);
Tailwind
colors: {
  custom: {
    50: '#7e5faf',
    500: '#401f8d',
    950: '#000000',
  },
}
SCSS
$custom: #401f8d;
$custom-light: #7e5faf;
$custom-dark: #000000;
JSON
{
  "hex": "#401f8d",
  "rgb": {
    "r": 64,
    "g": 31,
    "b": 141
  },
  "hsl": {
    "h": 258,
    "s": 63.953,
    "l": 33.725
  },
  "oklch": {
    "l": 0.36099,
    "c": 0.16715,
    "h": 288.7
  },
  "luminance": 0.03993
}

Semantic roles & 50–950 ramp

primary
#401F8D
secondary
#9ABB4D
accent
#E741B5
background
#F8F5FA
surface
#EFE9F5
border
#CAC5CF
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #401F8D

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

Preview Lab → · Contrast checker → · Palette generator →

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