#402078#402078

#402078 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.2% C 0.141 H 294.4°. Best body text is #FFFFFF at 12.38:1 contrast (WCAG AA passes).

Color values

HEX#402078
RGBrgb(64, 32, 120)
HSLhsl(262, 58%, 30%)
HSVhsv(262, 73%, 47%)
CMYKcmyk(46.7%, 73.3%, 0%, 52.9%)
CIE-LABlab(21.87, 36.08, -44.72)
CIE-LCHlch(21.87, 57.46, 308.90°)
OKLaboklab(34.24% 0.0581 -0.128)
OKLCHoklch(34.24% 0.141 294.4)
XYZxyz(6.0201, 3.4789, 18.1200)
Luminance0.0348 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402078 #587820
analogous
#202C78 #402078 #6C2078
triadic
#402078 #784020 #207840
tetradic
#402078 #78202C #587820 #20786C
square
#402078 #78202C #587820 #20786C
split-complementary
#402078 #786C20 #2C7820
monochromatic
#0D0618 #261348 #402078 #5A2DA8 #7745CD

Accessibility & contrast

On white

12.38
#402078 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#402078 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402078
12.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402078#FFFFFF#000000##FFFFFF
##4020781.0012.381.7012.38
#FFFFFF12.381.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00357B
Deuteranopia (green-blind)
#003376
Tritanopia (blue-blind)
#303649
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #402078;
/* rgb */ color: rgb(64, 32, 120);
/* oklch */ color: oklch(34.2% 0.141 294.4);
Tailwind
colors: {
  custom: {
    50: '#7b5ea0',
    500: '#402078',
    950: '#000000',
  },
}
SCSS
$custom: #402078;
$custom-light: #7b5ea0;
$custom-dark: #000000;
JSON
{
  "hex": "#402078",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 120
  },
  "hsl": {
    "h": 261.818,
    "s": 57.895,
    "l": 29.804
  },
  "oklch": {
    "l": 0.34241,
    "c": 0.14057,
    "h": 294.4
  },
  "luminance": 0.03479
}

Semantic roles & 50–950 ramp

primary
#402078
secondary
#87AB48
accent
#E147A9
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040F
muted
#7C797E

Preview Lab

Preview with #402078

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

Preview Lab → · Contrast checker → · Palette generator →

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