#402E87#402E87

#402E87 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 37.7% C 0.141 H 286.8°. Best body text is #FFFFFF at 10.72:1 contrast (WCAG AA passes).

Color values

HEX#402E87
RGBrgb(64, 46, 135)
HSLhsl(252, 49%, 35%)
HSVhsv(252, 66%, 53%)
CMYKcmyk(52.6%, 65.9%, 0%, 47.1%)
CIE-LABlab(26.14, 32.49, -47.23)
CIE-LCHlch(26.14, 57.33, 304.52°)
OKLaboklab(37.71% 0.0409 -0.1354)
OKLCHoklch(37.71% 0.141 286.8)
XYZxyz(7.4632, 4.7929, 23.4488)
Luminance0.0479 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E87 #75872E
analogous
#2E4887 #402E87 #6C2E87
triadic
#402E87 #87402E #2E8740
tetradic
#402E87 #872E48 #75872E #2E876C
square
#402E87 #872E48 #75872E #2E876C
split-complementary
#402E87 #876C2E #48872E
monochromatic
#150F2C #2A1E59 #402E87 #563EB5 #7965CA

Accessibility & contrast

On white

10.72
#402E87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#402E87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E87
10.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E87#FFFFFF#000000##FFFFFF
##402E871.0010.721.9610.72
#FFFFFF10.721.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408A
Deuteranopia (green-blind)
#003B85
Tritanopia (blue-blind)
#264456
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402e87;
/* rgb */ color: rgb(64, 46, 135);
/* oklch */ color: oklch(37.7% 0.141 286.8);
Tailwind
colors: {
  custom: {
    50: '#7c68ab',
    500: '#402e87',
    950: '#000000',
  },
}
SCSS
$custom: #402e87;
$custom-light: #7c68ab;
$custom-dark: #000000;
JSON
{
  "hex": "#402e87",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 135
  },
  "hsl": {
    "h": 252.135,
    "s": 49.171,
    "l": 35.49
  },
  "oklch": {
    "l": 0.37707,
    "c": 0.14147,
    "h": 286.8
  },
  "luminance": 0.04793
}

Semantic roles & 50–950 ramp

primary
#402E87
secondary
#A1B160
accent
#D94FBD
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402E87

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

Preview Lab → · Contrast checker → · Palette generator →

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