#402D90#402D90

#402D90 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.3% C 0.155 H 285.3°. Best body text is #FFFFFF at 10.52:1 contrast (WCAG AA passes).

Color values

HEX#402D90
RGBrgb(64, 45, 144)
HSLhsl(252, 52%, 37%)
HSVhsv(252, 69%, 56%)
CMYKcmyk(55.6%, 68.7%, 0%, 43.5%)
CIE-LABlab(26.68, 35.94, -51.94)
CIE-LCHlch(26.68, 63.16, 304.69°)
OKLaboklab(38.34% 0.0408 -0.1492)
OKLCHoklch(38.34% 0.155 285.3)
XYZxyz(8.0853, 4.9799, 26.9153)
Luminance0.0498 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D90 #7D902D
analogous
#2D4C90 #402D90 #722D90
triadic
#402D90 #90402D #2D9040
tetradic
#402D90 #902D4C #7D902D #2D9072
square
#402D90 #902D4C #7D902D #2D9072
split-complementary
#402D90 #90722D #4C902D
monochromatic
#171033 #2B1E61 #402D90 #553CBF #7C68D0

Accessibility & contrast

On white

10.52
#402D90 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#402D90 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D90
10.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D90#FFFFFF#000000##FFFFFF
##402D901.0010.522.0010.52
#FFFFFF10.521.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004293
Deuteranopia (green-blind)
#003C8E
Tritanopia (blue-blind)
#1D465A
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #402d90;
/* rgb */ color: rgb(64, 45, 144);
/* oklch */ color: oklch(38.3% 0.155 285.3);
Tailwind
colors: {
  custom: {
    50: '#7d67b1',
    500: '#402d90',
    950: '#000000',
  },
}
SCSS
$custom: #402d90;
$custom-light: #7d67b1;
$custom-dark: #000000;
JSON
{
  "hex": "#402d90",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 144
  },
  "hsl": {
    "h": 251.515,
    "s": 52.381,
    "l": 37.059
  },
  "oklch": {
    "l": 0.38336,
    "c": 0.15472,
    "h": 285.3
  },
  "luminance": 0.0498
}

Semantic roles & 50–950 ramp

primary
#402D90
secondary
#A6B662
accent
#DC4CC0
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402D90

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

Preview Lab → · Contrast checker → · Palette generator →

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