#402A76#402A76

#402A76 is a dark, vivid violet. Relative luminance 0.041; OKLCH L 35.6% C 0.124 H 292.3°. Best body text is #FFFFFF at 11.60:1 contrast (WCAG AA passes).

Color values

HEX#402A76
RGBrgb(64, 42, 118)
HSLhsl(257, 48%, 31%)
HSVhsv(257, 64%, 46%)
CMYKcmyk(45.8%, 64.4%, 0%, 53.7%)
CIE-LABlab(23.85, 29.64, -40.22)
CIE-LCHlch(23.85, 49.96, 306.38°)
OKLaboklab(35.61% 0.047 -0.1148)
OKLCHoklch(35.61% 0.124 292.3)
XYZxyz(6.2114, 4.0537, 17.5912)
Luminance0.0405 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A76 #60762A
analogous
#2A3A76 #402A76 #662A76
triadic
#402A76 #76402A #2A7640
tetradic
#402A76 #762A3A #60762A #2A7666
square
#402A76 #762A3A #60762A #2A7666
split-complementary
#402A76 #76662A #3A762A
monochromatic
#0F0A1C #281A49 #402A76 #583AA3 #7657C3

Accessibility & contrast

On white

11.60
#402A76 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#402A76 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A76
11.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A76#FFFFFF#000000##FFFFFF
##402A761.0011.601.8111.60
#FFFFFF11.601.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A78
Deuteranopia (green-blind)
#003774
Tritanopia (blue-blind)
#313B4B
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #402a76;
/* rgb */ color: rgb(64, 42, 118);
/* oklch */ color: oklch(35.6% 0.124 292.3);
Tailwind
colors: {
  custom: {
    50: '#79659e',
    500: '#402a76',
    950: '#000000',
  },
}
SCSS
$custom: #402a76;
$custom-light: #79659e;
$custom-dark: #000000;
JSON
{
  "hex": "#402a76",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 118
  },
  "hsl": {
    "h": 257.368,
    "s": 47.5,
    "l": 31.373
  },
  "oklch": {
    "l": 0.35614,
    "c": 0.12408,
    "h": 292.3
  },
  "luminance": 0.04054
}

Semantic roles & 50–950 ramp

primary
#402A76
secondary
#90A854
accent
#D751B0
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09050E
muted
#7B7A7E

Preview Lab

Preview with #402A76

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

Preview Lab → · Contrast checker → · Palette generator →

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