#401F7D#401F7D

#401F7D is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.6% C 0.148 H 293.1°. Best body text is #FFFFFF at 12.28:1 contrast (WCAG AA passes).

Color values

HEX#401F7D
RGBrgb(64, 31, 125)
HSLhsl(261, 60%, 31%)
HSVhsv(261, 75%, 49%)
CMYKcmyk(48.8%, 75.2%, 0%, 51%)
CIE-LABlab(22.13, 38.07, -47.48)
CIE-LCHlch(22.13, 60.86, 308.72°)
OKLaboklab(34.56% 0.058 -0.1361)
OKLCHoklch(34.56% 0.148 293.1)
XYZxyz(6.3050, 3.5504, 19.7512)
Luminance0.0355 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401F7D #5C7D1F
analogous
#1F2D7D #401F7D #6F1F7D
triadic
#401F7D #7D401F #1F7D40
tetradic
#401F7D #7D1F2D #5C7D1F #1F7D6F
square
#401F7D #7D1F2D #5C7D1F #1F7D6F
split-complementary
#401F7D #7D6F1F #2D7D1F
monochromatic
#0E071B #27134C #401F7D #592BAE #7645D1

Accessibility & contrast

On white

12.28
#401F7D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#401F7D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401F7D
12.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401F7D#FFFFFF#000000##FFFFFF
##401F7D1.0012.281.7112.28
#FFFFFF12.281.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.281.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #401f7d;
/* rgb */ color: rgb(64, 31, 125);
/* oklch */ color: oklch(34.6% 0.148 293.1);
Tailwind
colors: {
  custom: {
    50: '#7b5ea3',
    500: '#401f7d',
    950: '#000000',
  },
}
SCSS
$custom: #401f7d;
$custom-light: #7b5ea3;
$custom-dark: #000000;
JSON
{
  "hex": "#401f7d",
  "rgb": {
    "r": 64,
    "g": 31,
    "b": 125
  },
  "hsl": {
    "h": 261.064,
    "s": 60.256,
    "l": 30.588
  },
  "oklch": {
    "l": 0.34562,
    "c": 0.14796,
    "h": 293.1
  },
  "luminance": 0.03551
}

Semantic roles & 50–950 ramp

primary
#401F7D
secondary
#8BB048
accent
#E344AC
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #401F7D

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

Preview Lab → · Contrast checker → · Palette generator →

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