#402E89#402E89

#402E89 is a dark, vivid violet. Relative luminance 0.049; OKLCH L 37.9% C 0.144 H 286.4°. Best body text is #FFFFFF at 10.66:1 contrast (WCAG AA passes).

Color values

HEX#402E89
RGBrgb(64, 46, 137)
HSLhsl(252, 50%, 36%)
HSVhsv(252, 66%, 54%)
CMYKcmyk(53.3%, 66.4%, 0%, 46.3%)
CIE-LABlab(26.30, 33.12, -48.21)
CIE-LCHlch(26.30, 58.49, 304.49°)
OKLaboklab(37.88% 0.0407 -0.1383)
OKLCHoklch(37.88% 0.144 286.4)
XYZxyz(7.6054, 4.8497, 24.1974)
Luminance0.0485 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E89 #77892E
analogous
#2E4989 #402E89 #6D2E89
triadic
#402E89 #89402E #2E8940
tetradic
#402E89 #892E49 #77892E #2E896D
square
#402E89 #892E49 #77892E #2E896D
split-complementary
#402E89 #896D2E #49892E
monochromatic
#150F2D #2B1F5B #402E89 #553DB7 #7A66CC

Accessibility & contrast

On white

10.66
#402E89 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#402E89 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E89
10.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E89#FFFFFF#000000##FFFFFF
##402E891.0010.661.9710.66
#FFFFFF10.661.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00418C
Deuteranopia (green-blind)
#003C87
Tritanopia (blue-blind)
#244457
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402e89;
/* rgb */ color: rgb(64, 46, 137);
/* oklch */ color: oklch(37.9% 0.144 286.4);
Tailwind
colors: {
  custom: {
    50: '#7c68ac',
    500: '#402e89',
    950: '#000000',
  },
}
SCSS
$custom: #402e89;
$custom-light: #7c68ac;
$custom-dark: #000000;
JSON
{
  "hex": "#402e89",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 137
  },
  "hsl": {
    "h": 251.868,
    "s": 49.727,
    "l": 35.882
  },
  "oklch": {
    "l": 0.3788,
    "c": 0.14416,
    "h": 286.4
  },
  "luminance": 0.0485
}

Semantic roles & 50–950 ramp

primary
#402E89
secondary
#A2B260
accent
#D94FBE
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402E89

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

Preview Lab → · Contrast checker → · Palette generator →

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