#401E7F#401E7F

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

Color values

HEX#401E7F
RGBrgb(64, 30, 127)
HSLhsl(261, 62%, 31%)
HSVhsv(261, 76%, 50%)
CMYKcmyk(49.6%, 76.4%, 0%, 50.2%)
CIE-LABlab(22.13, 39.17, -48.75)
CIE-LCHlch(22.13, 62.53, 308.78°)
OKLaboklab(34.62% 0.0584 -0.1398)
OKLCHoklch(34.62% 0.152 292.7)
XYZxyz(6.4083, 3.5506, 20.4222)
Luminance0.0355 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401E7F #5D7F1E
analogous
#1E2C7F #401E7F #701E7F
triadic
#401E7F #7F401E #1E7F40
tetradic
#401E7F #7F1E2C #5D7F1E #1E7F70
square
#401E7F #7F1E2C #5D7F1E #1E7F70
split-complementary
#401E7F #7F701E #2C7F1E
monochromatic
#0E071C #27124D #401E7F #592AB1 #7644D3

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##401E7F#FFFFFF#000000##FFFFFF
##401E7F1.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)
#003682
Deuteranopia (green-blind)
#00337D
Tritanopia (blue-blind)
#2C384D
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #401e7f;
/* rgb */ color: rgb(64, 30, 127);
/* oklch */ color: oklch(34.6% 0.152 292.7);
Tailwind
colors: {
  custom: {
    50: '#7c5da5',
    500: '#401e7f',
    950: '#000000',
  },
}
SCSS
$custom: #401e7f;
$custom-light: #7c5da5;
$custom-dark: #000000;
JSON
{
  "hex": "#401e7f",
  "rgb": {
    "r": 64,
    "g": 30,
    "b": 127
  },
  "hsl": {
    "h": 261.031,
    "s": 61.783,
    "l": 30.784
  },
  "oklch": {
    "l": 0.3462,
    "c": 0.15154,
    "h": 292.7
  },
  "luminance": 0.03551
}

Semantic roles & 50–950 ramp

primary
#401E7F
secondary
#8CB247
accent
#E543AC
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #401E7F

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

Preview Lab → · Contrast checker → · Palette generator →

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