#401878#401878

#401878 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.2% C 0.150 H 296.0°. Best body text is #FFFFFF at 12.96:1 contrast (WCAG AA passes).

Color values

HEX#401878
RGBrgb(64, 24, 120)
HSLhsl(265, 67%, 28%)
HSVhsv(265, 80%, 47%)
CMYKcmyk(46.7%, 80%, 0%, 52.9%)
CIE-LABlab(20.44, 40.13, -47.06)
CIE-LCHlch(20.44, 61.85, 310.46°)
OKLaboklab(33.23% 0.0657 -0.1348)
OKLCHoklch(33.23% 0.15 296)
XYZxyz(5.8302, 3.0992, 18.0567)
Luminance0.0310 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401878 #507818
analogous
#182078 #401878 #701878
triadic
#401878 #784018 #187840
tetradic
#401878 #781820 #507818 #187870
square
#401878 #781820 #507818 #187870
split-complementary
#401878 #787018 #207818
monochromatic
#0E051A #250E45 #401878 #5B22AB #7834D6

Accessibility & contrast

On white

12.96
#401878 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#401878 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401878
12.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401878#FFFFFF#000000##FFFFFF
##4018781.0012.961.6212.96
#FFFFFF12.961.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327B
Deuteranopia (green-blind)
#003076
Tritanopia (blue-blind)
#303247
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #401878;
/* rgb */ color: rgb(64, 24, 120);
/* oklch */ color: oklch(33.2% 0.150 296.0);
Tailwind
colors: {
  custom: {
    50: '#7b5aa0',
    500: '#401878',
    950: '#000000',
  },
}
SCSS
$custom: #401878;
$custom-light: #7b5aa0;
$custom-dark: #000000;
JSON
{
  "hex": "#401878",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 120
  },
  "hsl": {
    "h": 265,
    "s": 66.667,
    "l": 28.235
  },
  "oklch": {
    "l": 0.33231,
    "c": 0.15,
    "h": 296
  },
  "luminance": 0.03099
}

Semantic roles & 50–950 ramp

primary
#401878
secondary
#7FAD3F
accent
#EA3EA2
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040F
muted
#7C797E

Preview Lab

Preview with #401878

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

Preview Lab → · Contrast checker → · Palette generator →

#401878 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva