#402A89#402A89

#402A89 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.2% C 0.149 H 287.4°. Best body text is #FFFFFF at 10.99:1 contrast (WCAG AA passes).

Color values

HEX#402A89
RGBrgb(64, 42, 137)
HSLhsl(254, 53%, 35%)
HSVhsv(254, 69%, 54%)
CMYKcmyk(53.3%, 69.3%, 0%, 46.3%)
CIE-LABlab(25.42, 35.52, -49.65)
CIE-LCHlch(25.42, 61.05, 305.58°)
OKLaboklab(37.24% 0.0448 -0.1425)
OKLCHoklch(37.24% 0.149 287.4)
XYZxyz(7.4563, 4.5517, 24.1477)
Luminance0.0455 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A89 #73892A
analogous
#2A4389 #402A89 #702A89
triadic
#402A89 #89402A #2A8940
tetradic
#402A89 #892A43 #73892A #2A8970
square
#402A89 #892A43 #73892A #2A8970
split-complementary
#402A89 #89702A #43892A
monochromatic
#140D2B #2A1C5A #402A89 #5638B8 #795FCE

Accessibility & contrast

On white

10.99
#402A89 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#402A89 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A89
10.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A89#FFFFFF#000000##FFFFFF
##402A891.0010.991.9110.99
#FFFFFF10.991.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8C
Deuteranopia (green-blind)
#003A87
Tritanopia (blue-blind)
#244256
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #402a89;
/* rgb */ color: rgb(64, 42, 137);
/* oklch */ color: oklch(37.2% 0.149 287.4);
Tailwind
colors: {
  custom: {
    50: '#7c65ac',
    500: '#402a89',
    950: '#000000',
  },
}
SCSS
$custom: #402a89;
$custom-light: #7c65ac;
$custom-dark: #000000;
JSON
{
  "hex": "#402a89",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 137
  },
  "hsl": {
    "h": 253.895,
    "s": 53.073,
    "l": 35.098
  },
  "oklch": {
    "l": 0.37241,
    "c": 0.14941,
    "h": 287.4
  },
  "luminance": 0.04552
}

Semantic roles & 50–950 ramp

primary
#402A89
secondary
#9FB45B
accent
#DC4BBB
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402A89

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

Preview Lab → · Contrast checker → · Palette generator →

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