#401D7B#401D7B

#401D7B is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.1% C 0.148 H 294.1°. Best body text is #FFFFFF at 12.50:1 contrast (WCAG AA passes).

Color values

HEX#401D7B
RGBrgb(64, 29, 123)
HSLhsl(262, 62%, 30%)
HSVhsv(262, 76%, 48%)
CMYKcmyk(48%, 76.4%, 0%, 51.8%)
CIE-LABlab(21.57, 38.53, -47.11)
CIE-LCHlch(21.57, 60.86, 309.28°)
OKLaboklab(34.12% 0.0604 -0.135)
OKLCHoklch(34.12% 0.148 294.1)
XYZxyz(6.1279, 3.3986, 19.0682)
Luminance0.0340 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401D7B #587B1D
analogous
#1D297B #401D7B #6F1D7B
triadic
#401D7B #7B401D #1D7B40
tetradic
#401D7B #7B1D29 #587B1D #1D7B6F
square
#401D7B #7B1D29 #587B1D #1D7B6F
split-complementary
#401D7B #7B6F1D #297B1D
monochromatic
#0D0619 #261149 #401D7B #5A29AD #7740D2

Accessibility & contrast

On white

12.50
#401D7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#401D7B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401D7B
12.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401D7B#FFFFFF#000000##FFFFFF
##401D7B1.0012.501.6812.50
#FFFFFF12.501.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00357E
Deuteranopia (green-blind)
#003279
Tritanopia (blue-blind)
#2F364A
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #401d7b;
/* rgb */ color: rgb(64, 29, 123);
/* oklch */ color: oklch(34.1% 0.148 294.1);
Tailwind
colors: {
  custom: {
    50: '#7b5da2',
    500: '#401d7b',
    950: '#000000',
  },
}
SCSS
$custom: #401d7b;
$custom-light: #7b5da2;
$custom-dark: #000000;
JSON
{
  "hex": "#401d7b",
  "rgb": {
    "r": 64,
    "g": 29,
    "b": 123
  },
  "hsl": {
    "h": 262.34,
    "s": 61.842,
    "l": 29.804
  },
  "oklch": {
    "l": 0.34116,
    "c": 0.14791,
    "h": 294.1
  },
  "luminance": 0.03399
}

Semantic roles & 50–950 ramp

primary
#401D7B
secondary
#87AF45
accent
#E543A9
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #401D7B

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

Preview Lab → · Contrast checker → · Palette generator →

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