#402D9A#402D9A

#402D9A is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.3% C 0.168 H 283.5°. Best body text is #FFFFFF at 10.19:1 contrast (WCAG AA passes).

Color values

HEX#402D9A
RGBrgb(64, 45, 154)
HSLhsl(250, 55%, 39%)
HSVhsv(250, 71%, 60%)
CMYKcmyk(58.4%, 70.8%, 0%, 39.6%)
CIE-LABlab(27.57, 39.10, -56.62)
CIE-LCHlch(27.57, 68.81, 304.63°)
OKLaboklab(39.25% 0.0391 -0.163)
OKLCHoklch(39.25% 0.168 283.5)
XYZxyz(8.8837, 5.2993, 31.1203)
Luminance0.0530 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D9A #879A2D
analogous
#2D519A #402D9A #772D9A
triadic
#402D9A #9A402D #2D9A40
tetradic
#402D9A #9A2D51 #879A2D #2D9A77
square
#402D9A #9A2D51 #879A2D #2D9A77
split-complementary
#402D9A #9A772D #519A2D
monochromatic
#19113B #2C1F6B #402D9A #563EC7 #7F6DD4

Accessibility & contrast

On white

10.19
#402D9A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#402D9A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D9A
10.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D9A#FFFFFF#000000##FFFFFF
##402D9A1.0010.192.0610.19
#FFFFFF10.191.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00449D
Deuteranopia (green-blind)
#003D98
Tritanopia (blue-blind)
#0F4A60
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402d9a;
/* rgb */ color: rgb(64, 45, 154);
/* oklch */ color: oklch(39.3% 0.168 283.5);
Tailwind
colors: {
  custom: {
    50: '#7f68b9',
    500: '#402d9a',
    950: '#000000',
  },
}
SCSS
$custom: #402d9a;
$custom-light: #7f68b9;
$custom-dark: #000000;
JSON
{
  "hex": "#402d9a",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 154
  },
  "hsl": {
    "h": 250.459,
    "s": 54.774,
    "l": 39.02
  },
  "oklch": {
    "l": 0.39253,
    "c": 0.16761,
    "h": 283.5
  },
  "luminance": 0.053
}

Semantic roles & 50–950 ramp

primary
#402D9A
secondary
#ADBB67
accent
#DE4AC4
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402D9A

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

Preview Lab → · Contrast checker → · Palette generator →

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