#401D7F#401D7F

#401D7F is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.5% C 0.153 H 292.9°. Best body text is #FFFFFF at 12.35:1 contrast (WCAG AA passes).

Color values

HEX#401D7F
RGBrgb(64, 29, 127)
HSLhsl(261, 63%, 31%)
HSVhsv(261, 77%, 50%)
CMYKcmyk(49.6%, 77.2%, 0%, 50.2%)
CIE-LABlab(21.95, 39.67, -49.04)
CIE-LCHlch(21.95, 63.08, 308.97°)
OKLaboklab(34.49% 0.0593 -0.1407)
OKLCHoklch(34.49% 0.153 292.9)
XYZxyz(6.3834, 3.5008, 20.4139)
Luminance0.0350 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401D7F #5C7F1D
analogous
#1D2B7F #401D7F #711D7F
triadic
#401D7F #7F401D #1D7F40
tetradic
#401D7F #7F1D2B #5C7F1D #1D7F71
square
#401D7F #7F1D2B #5C7F1D #1D7F71
split-complementary
#401D7F #7F711D #2B7F1D
monochromatic
#0E061B #27124D #401D7F #5928B1 #7642D4

Accessibility & contrast

On white

12.35
#401D7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#401D7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401D7F
12.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401D7F#FFFFFF#000000##FFFFFF
##401D7F1.0012.351.7012.35
#FFFFFF12.351.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003682
Deuteranopia (green-blind)
#00337D
Tritanopia (blue-blind)
#2C374C
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #401d7f;
/* rgb */ color: rgb(64, 29, 127);
/* oklch */ color: oklch(34.5% 0.153 292.9);
Tailwind
colors: {
  custom: {
    50: '#7c5da5',
    500: '#401d7f',
    950: '#000000',
  },
}
SCSS
$custom: #401d7f;
$custom-light: #7c5da5;
$custom-dark: #000000;
JSON
{
  "hex": "#401d7f",
  "rgb": {
    "r": 64,
    "g": 29,
    "b": 127
  },
  "hsl": {
    "h": 261.429,
    "s": 62.821,
    "l": 30.588
  },
  "oklch": {
    "l": 0.34494,
    "c": 0.15268,
    "h": 292.9
  },
  "luminance": 0.03501
}

Semantic roles & 50–950 ramp

primary
#401D7F
secondary
#8BB245
accent
#E642AB
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #401D7F

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

Preview Lab → · Contrast checker → · Palette generator →

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