#402E71#402E71

#402E71 is a dark, moderate violet. Relative luminance 0.042; OKLCH L 35.9% C 0.111 H 292.3°. Best body text is #FFFFFF at 11.37:1 contrast (WCAG AA passes).

Color values

HEX#402E71
RGBrgb(64, 46, 113)
HSLhsl(256, 42%, 31%)
HSVhsv(256, 59%, 44%)
CMYKcmyk(43.4%, 59.3%, 0%, 55.7%)
CIE-LABlab(24.44, 25.57, -36.08)
CIE-LCHlch(24.44, 44.22, 305.33°)
OKLaboklab(35.93% 0.0421 -0.1026)
OKLCHoklch(35.93% 0.111 292.3)
XYZxyz(6.0712, 4.2361, 16.1173)
Luminance0.0424 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E71 #5F712E
analogous
#2E3D71 #402E71 #612E71
triadic
#402E71 #71402E #2E7140
tetradic
#402E71 #712E3D #5F712E #2E7161
square
#402E71 #712E3D #5F712E #2E7161
split-complementary
#402E71 #71612E #3D712E
monochromatic
#0F0B1A #271C46 #402E71 #59409C #765DBD

Accessibility & contrast

On white

11.37
#402E71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#402E71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E71
11.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E71#FFFFFF#000000##FFFFFF
##402E711.0011.371.8511.37
#FFFFFF11.371.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#093B73
Deuteranopia (green-blind)
#0F3970
Tritanopia (blue-blind)
#333C4A
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #402e71;
/* rgb */ color: rgb(64, 46, 113);
/* oklch */ color: oklch(35.9% 0.111 292.3);
Tailwind
colors: {
  custom: {
    50: '#78679a',
    500: '#402e71',
    950: '#000000',
  },
}
SCSS
$custom: #402e71;
$custom-light: #78679a;
$custom-dark: #000000;
JSON
{
  "hex": "#402e71",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 113
  },
  "hsl": {
    "h": 256.119,
    "s": 42.138,
    "l": 31.176
  },
  "oklch": {
    "l": 0.35927,
    "c": 0.11091,
    "h": 292.3
  },
  "luminance": 0.04236
}

Semantic roles & 50–950 ramp

primary
#402E71
secondary
#8FA258
accent
#D256B1
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09060E
muted
#7B7A7E

Preview Lab

Preview with #402E71

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

Preview Lab → · Contrast checker → · Palette generator →

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