#401F87#401F87

#401F87 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.5% C 0.160 H 290.3°. Best body text is #FFFFFF at 11.91:1 contrast (WCAG AA passes).

Color values

HEX#401F87
RGBrgb(64, 31, 135)
HSLhsl(259, 63%, 33%)
HSVhsv(259, 77%, 53%)
CMYKcmyk(52.6%, 77%, 0%, 47.1%)
CIE-LABlab(23.06, 40.97, -52.25)
CIE-LCHlch(23.06, 66.40, 308.10°)
OKLaboklab(35.51% 0.0554 -0.1501)
OKLCHoklch(35.51% 0.16 290.3)
XYZxyz(6.9763, 3.8189, 23.2865)
Luminance0.0382 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401F87 #66871F
analogous
#1F3287 #401F87 #741F87
triadic
#401F87 #87401F #1F8740
tetradic
#401F87 #871F32 #66871F #1F8774
square
#401F87 #871F32 #66871F #1F8774
split-complementary
#401F87 #87741F #32871F
monochromatic
#110823 #281455 #401F87 #582AB9 #774BD6

Accessibility & contrast

On white

11.91
#401F87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#401F87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401F87
11.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401F87#FFFFFF#000000##FFFFFF
##401F871.0011.911.7611.91
#FFFFFF11.911.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398A
Deuteranopia (green-blind)
#003585
Tritanopia (blue-blind)
#273C52
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #401f87;
/* rgb */ color: rgb(64, 31, 135);
/* oklch */ color: oklch(35.5% 0.160 290.3);
Tailwind
colors: {
  custom: {
    50: '#7d5eab',
    500: '#401f87',
    950: '#000000',
  },
}
SCSS
$custom: #401f87;
$custom-light: #7d5eab;
$custom-dark: #000000;
JSON
{
  "hex": "#401f87",
  "rgb": {
    "r": 64,
    "g": 31,
    "b": 135
  },
  "hsl": {
    "h": 259.038,
    "s": 62.651,
    "l": 32.549
  },
  "oklch": {
    "l": 0.35512,
    "c": 0.16002,
    "h": 290.3
  },
  "luminance": 0.03819
}

Semantic roles & 50–950 ramp

primary
#401F87
secondary
#95B84A
accent
#E642B2
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #401F87

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

Preview Lab → · Contrast checker → · Palette generator →

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