#401F7E#401F7E

#401F7E is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.7% C 0.149 H 292.8°. Best body text is #FFFFFF at 12.24:1 contrast (WCAG AA passes).

Color values

HEX#401F7E
RGBrgb(64, 31, 126)
HSLhsl(261, 61%, 31%)
HSVhsv(261, 75%, 49%)
CMYKcmyk(49.2%, 75.4%, 0%, 50.6%)
CIE-LABlab(22.22, 38.36, -47.97)
CIE-LCHlch(22.22, 61.42, 308.65°)
OKLaboklab(34.66% 0.0577 -0.1375)
OKLCHoklch(34.66% 0.149 292.8)
XYZxyz(6.3692, 3.5761, 20.0893)
Luminance0.0358 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401F7E #5D7E1F
analogous
#1F2D7E #401F7E #6F1F7E
triadic
#401F7E #7E401F #1F7E40
tetradic
#401F7E #7E1F2D #5D7E1F #1F7E6F
square
#401F7E #7E1F2D #5D7E1F #1F7E6F
split-complementary
#401F7E #7E6F1F #2D7E1F
monochromatic
#0E071C #27134D #401F7E #592BAF #7646D1

Accessibility & contrast

On white

12.24
#401F7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#401F7E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401F7E
12.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401F7E#FFFFFF#000000##FFFFFF
##401F7E1.0012.241.7212.24
#FFFFFF12.241.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003681
Deuteranopia (green-blind)
#00337C
Tritanopia (blue-blind)
#2D384C
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #401f7e;
/* rgb */ color: rgb(64, 31, 126);
/* oklch */ color: oklch(34.7% 0.149 292.8);
Tailwind
colors: {
  custom: {
    50: '#7c5ea4',
    500: '#401f7e',
    950: '#000000',
  },
}
SCSS
$custom: #401f7e;
$custom-light: #7c5ea4;
$custom-dark: #000000;
JSON
{
  "hex": "#401f7e",
  "rgb": {
    "r": 64,
    "g": 31,
    "b": 126
  },
  "hsl": {
    "h": 260.842,
    "s": 60.51,
    "l": 30.784
  },
  "oklch": {
    "l": 0.34656,
    "c": 0.14917,
    "h": 292.8
  },
  "luminance": 0.03576
}

Semantic roles & 50–950 ramp

primary
#401F7E
secondary
#8CB148
accent
#E444AC
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #401F7E

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

Preview Lab → · Contrast checker → · Palette generator →

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