#402A79#402A79

#402A79 is a dark, vivid violet. Relative luminance 0.041; OKLCH L 35.9% C 0.128 H 291.4°. Best body text is #FFFFFF at 11.51:1 contrast (WCAG AA passes).

Color values

HEX#402A79
RGBrgb(64, 42, 121)
HSLhsl(257, 48%, 32%)
HSVhsv(257, 65%, 47%)
CMYKcmyk(47.1%, 65.3%, 0%, 52.5%)
CIE-LABlab(24.08, 30.56, -41.75)
CIE-LCHlch(24.08, 51.74, 306.20°)
OKLaboklab(35.86% 0.0468 -0.1193)
OKLCHoklch(35.86% 0.128 291.4)
XYZxyz(6.3925, 4.1262, 18.5451)
Luminance0.0413 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A79 #63792A
analogous
#2A3C79 #402A79 #682A79
triadic
#402A79 #79402A #2A7940
tetradic
#402A79 #792A3C #63792A #2A7968
square
#402A79 #792A3C #63792A #2A7968
split-complementary
#402A79 #79682A #3C792A
monochromatic
#100A1E #281A4C #402A79 #583AA6 #7758C5

Accessibility & contrast

On white

11.51
#402A79 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#402A79 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A79
11.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A79#FFFFFF#000000##FFFFFF
##402A791.0011.511.8311.51
#FFFFFF11.511.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B7C
Deuteranopia (green-blind)
#003877
Tritanopia (blue-blind)
#2F3C4D
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #402a79;
/* rgb */ color: rgb(64, 42, 121);
/* oklch */ color: oklch(35.9% 0.128 291.4);
Tailwind
colors: {
  custom: {
    50: '#7a65a0',
    500: '#402a79',
    950: '#000000',
  },
}
SCSS
$custom: #402a79;
$custom-light: #7a65a0;
$custom-dark: #000000;
JSON
{
  "hex": "#402a79",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 121
  },
  "hsl": {
    "h": 256.709,
    "s": 48.466,
    "l": 31.961
  },
  "oklch": {
    "l": 0.35861,
    "c": 0.12816,
    "h": 291.4
  },
  "luminance": 0.04126
}

Semantic roles & 50–950 ramp

primary
#402A79
secondary
#93AB54
accent
#D850B2
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#0A050F
muted
#7C7A7E

Preview Lab

Preview with #402A79

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

Preview Lab → · Contrast checker → · Palette generator →

#402A79 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva