#401F8B#401F8B

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

Color values

HEX#401F8B
RGBrgb(64, 31, 139)
HSLhsl(258, 64%, 33%)
HSVhsv(258, 78%, 55%)
CMYKcmyk(54%, 77.7%, 0%, 45.5%)
CIE-LABlab(23.45, 42.13, -54.12)
CIE-LCHlch(23.45, 68.58, 307.90°)
OKLaboklab(35.9% 0.0543 -0.1556)
OKLCHoklch(35.9% 0.165 289.2)
XYZxyz(7.2632, 3.9337, 24.7977)
Luminance0.0393 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401F8B #6A8B1F
analogous
#1F348B #401F8B #761F8B
triadic
#401F8B #8B401F #1F8B40
tetradic
#401F8B #8B1F34 #6A8B1F #1F8B76
square
#401F8B #8B1F34 #6A8B1F #1F8B76
split-complementary
#401F8B #8B761F #348B1F
monochromatic
#120927 #291459 #401F8B #572ABD #774DD7

Accessibility & contrast

On white

11.75
#401F8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#401F8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401F8B
11.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401F8B#FFFFFF#000000##FFFFFF
##401F8B1.0011.751.7911.75
#FFFFFF11.751.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.751.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #401f8b;
/* rgb */ color: rgb(64, 31, 139);
/* oklch */ color: oklch(35.9% 0.165 289.2);
Tailwind
colors: {
  custom: {
    50: '#7e5fae',
    500: '#401f8b',
    950: '#000000',
  },
}
SCSS
$custom: #401f8b;
$custom-light: #7e5fae;
$custom-dark: #000000;
JSON
{
  "hex": "#401f8b",
  "rgb": {
    "r": 64,
    "g": 31,
    "b": 139
  },
  "hsl": {
    "h": 258.333,
    "s": 63.529,
    "l": 33.333
  },
  "oklch": {
    "l": 0.35902,
    "c": 0.16478,
    "h": 289.2
  },
  "luminance": 0.03934
}

Semantic roles & 50–950 ramp

primary
#401F8B
secondary
#98BA4C
accent
#E741B4
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #401F8B

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

Preview Lab → · Contrast checker → · Palette generator →

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