#401F81#401F81

#401F81 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 34.9% C 0.153 H 291.9°. Best body text is #FFFFFF at 12.13:1 contrast (WCAG AA passes).

Color values

HEX#401F81
RGBrgb(64, 31, 129)
HSLhsl(260, 61%, 31%)
HSVhsv(260, 76%, 51%)
CMYKcmyk(50.4%, 76%, 0%, 49.4%)
CIE-LABlab(22.50, 39.23, -49.41)
CIE-LCHlch(22.50, 63.09, 308.45°)
OKLaboklab(34.94% 0.057 -0.1418)
OKLCHoklch(34.94% 0.153 291.9)
XYZxyz(6.5657, 3.6547, 21.1241)
Luminance0.0365 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401F81 #60811F
analogous
#1F2F81 #401F81 #711F81
triadic
#401F81 #81401F #1F8140
tetradic
#401F81 #811F2F #60811F #1F8171
square
#401F81 #811F2F #60811F #1F8171
split-complementary
#401F81 #81711F #2F811F
monochromatic
#0F071E #281350 #401F81 #582BB2 #7647D3

Accessibility & contrast

On white

12.13
#401F81 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#401F81 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401F81
12.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401F81#FFFFFF#000000##FFFFFF
##401F811.0012.131.7312.13
#FFFFFF12.131.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003784
Deuteranopia (green-blind)
#00347F
Tritanopia (blue-blind)
#2B394E
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #401f81;
/* rgb */ color: rgb(64, 31, 129);
/* oklch */ color: oklch(34.9% 0.153 291.9);
Tailwind
colors: {
  custom: {
    50: '#7c5ea6',
    500: '#401f81',
    950: '#000000',
  },
}
SCSS
$custom: #401f81;
$custom-light: #7c5ea6;
$custom-dark: #000000;
JSON
{
  "hex": "#401f81",
  "rgb": {
    "r": 64,
    "g": 31,
    "b": 129
  },
  "hsl": {
    "h": 260.204,
    "s": 61.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.34937,
    "c": 0.1528,
    "h": 291.9
  },
  "luminance": 0.03655
}

Semantic roles & 50–950 ramp

primary
#401F81
secondary
#90B448
accent
#E443AE
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #401F81

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

Preview Lab → · Contrast checker → · Palette generator →

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