#401F8A#401F8A

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

Color values

HEX#401F8A
RGBrgb(64, 31, 138)
HSLhsl(259, 63%, 33%)
HSVhsv(259, 78%, 54%)
CMYKcmyk(53.6%, 77.5%, 0%, 45.9%)
CIE-LABlab(23.35, 41.84, -53.65)
CIE-LCHlch(23.35, 68.04, 307.95°)
OKLaboklab(35.8% 0.0546 -0.1542)
OKLCHoklch(35.8% 0.164 289.5)
XYZxyz(7.1905, 3.9046, 24.4146)
Luminance0.0391 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401F8A #698A1F
analogous
#1F338A #401F8A #751F8A
triadic
#401F8A #8A401F #1F8A40
tetradic
#401F8A #8A1F33 #698A1F #1F8A75
square
#401F8A #8A1F33 #698A1F #1F8A75
split-complementary
#401F8A #8A751F #338A1F
monochromatic
#120926 #291458 #401F8A #572ABC #774CD7

Accessibility & contrast

On white

11.79
#401F8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #401F8A
11.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401F8A#FFFFFF#000000##FFFFFF
##401F8A1.0011.791.7811.79
#FFFFFF11.791.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8D
Deuteranopia (green-blind)
#003588
Tritanopia (blue-blind)
#243D53
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #401f8a;
/* rgb */ color: rgb(64, 31, 138);
/* oklch */ color: oklch(35.8% 0.164 289.5);
Tailwind
colors: {
  custom: {
    50: '#7d5fad',
    500: '#401f8a',
    950: '#000000',
  },
}
SCSS
$custom: #401f8a;
$custom-light: #7d5fad;
$custom-dark: #000000;
JSON
{
  "hex": "#401f8a",
  "rgb": {
    "r": 64,
    "g": 31,
    "b": 138
  },
  "hsl": {
    "h": 258.505,
    "s": 63.314,
    "l": 33.137
  },
  "oklch": {
    "l": 0.35804,
    "c": 0.16359,
    "h": 289.5
  },
  "luminance": 0.03905
}

Semantic roles & 50–950 ramp

primary
#401F8A
secondary
#98BA4B
accent
#E641B3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #401F8A

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

Preview Lab → · Contrast checker → · Palette generator →

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