#401F7F#401F7F

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

Color values

HEX#401F7F
RGBrgb(64, 31, 127)
HSLhsl(261, 61%, 31%)
HSVhsv(261, 76%, 50%)
CMYKcmyk(49.6%, 75.6%, 0%, 50.2%)
CIE-LABlab(22.31, 38.65, -48.45)
CIE-LCHlch(22.31, 61.98, 308.58°)
OKLaboklab(34.75% 0.0575 -0.139)
OKLCHoklch(34.75% 0.15 292.5)
XYZxyz(6.4340, 3.6020, 20.4308)
Luminance0.0360 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401F7F #5E7F1F
analogous
#1F2E7F #401F7F #701F7F
triadic
#401F7F #7F401F #1F7F40
tetradic
#401F7F #7F1F2E #5E7F1F #1F7F70
square
#401F7F #7F1F2E #5E7F1F #1F7F70
split-complementary
#401F7F #7F701F #2E7F1F
monochromatic
#0E071D #27134E #401F7F #592BB0 #7646D2

Accessibility & contrast

On white

12.21
#401F7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #401F7F
12.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401F7F#FFFFFF#000000##FFFFFF
##401F7F1.0012.211.7212.21
#FFFFFF12.211.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.211.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #401f7f;
/* rgb */ color: rgb(64, 31, 127);
/* oklch */ color: oklch(34.7% 0.150 292.5);
Tailwind
colors: {
  custom: {
    50: '#7c5ea5',
    500: '#401f7f',
    950: '#000000',
  },
}
SCSS
$custom: #401f7f;
$custom-light: #7c5ea5;
$custom-dark: #000000;
JSON
{
  "hex": "#401f7f",
  "rgb": {
    "r": 64,
    "g": 31,
    "b": 127
  },
  "hsl": {
    "h": 260.625,
    "s": 60.759,
    "l": 30.98
  },
  "oklch": {
    "l": 0.34749,
    "c": 0.15038,
    "h": 292.5
  },
  "luminance": 0.03602
}

Semantic roles & 50–950 ramp

primary
#401F7F
secondary
#8DB248
accent
#E444AD
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #401F7F

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

Preview Lab → · Contrast checker → · Palette generator →

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