#402E8A#402E8A

#402E8A is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.0% C 0.145 H 286.2°. Best body text is #FFFFFF at 10.63:1 contrast (WCAG AA passes).

Color values

HEX#402E8A
RGBrgb(64, 46, 138)
HSLhsl(252, 50%, 36%)
HSVhsv(252, 67%, 54%)
CMYKcmyk(53.6%, 66.7%, 0%, 45.9%)
CIE-LABlab(26.39, 33.44, -48.69)
CIE-LCHlch(26.39, 59.07, 304.48°)
OKLaboklab(37.97% 0.0406 -0.1397)
OKLCHoklch(37.97% 0.146 286.2)
XYZxyz(7.6774, 4.8786, 24.5769)
Luminance0.0488 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E8A #788A2E
analogous
#2E4A8A #402E8A #6E2E8A
triadic
#402E8A #8A402E #2E8A40
tetradic
#402E8A #8A2E4A #788A2E #2E8A6E
square
#402E8A #8A2E4A #788A2E #2E8A6E
split-complementary
#402E8A #8A6E2E #4A8A2E
monochromatic
#150F2E #2B1F5C #402E8A #553DB8 #7A66CC

Accessibility & contrast

On white

10.63
#402E8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#402E8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E8A
10.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E8A#FFFFFF#000000##FFFFFF
##402E8A1.0010.631.9810.63
#FFFFFF10.631.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00418D
Deuteranopia (green-blind)
#003C88
Tritanopia (blue-blind)
#234557
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402e8a;
/* rgb */ color: rgb(64, 46, 138);
/* oklch */ color: oklch(38.0% 0.145 286.2);
Tailwind
colors: {
  custom: {
    50: '#7c68ad',
    500: '#402e8a',
    950: '#000000',
  },
}
SCSS
$custom: #402e8a;
$custom-light: #7c68ad;
$custom-dark: #000000;
JSON
{
  "hex": "#402e8a",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 138
  },
  "hsl": {
    "h": 251.739,
    "s": 50,
    "l": 36.078
  },
  "oklch": {
    "l": 0.37966,
    "c": 0.1455,
    "h": 286.2
  },
  "luminance": 0.04879
}

Semantic roles & 50–950 ramp

primary
#402E8A
secondary
#A3B361
accent
#DA4EBE
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402E8A

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

Preview Lab → · Contrast checker → · Palette generator →

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