#402D99#402D99

#402D99 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.2% C 0.166 H 283.7°. Best body text is #FFFFFF at 10.23:1 contrast (WCAG AA passes).

Color values

HEX#402D99
RGBrgb(64, 45, 153)
HSLhsl(251, 55%, 39%)
HSVhsv(251, 71%, 60%)
CMYKcmyk(58.2%, 70.6%, 0%, 40%)
CIE-LABlab(27.48, 38.79, -56.16)
CIE-LCHlch(27.48, 68.25, 304.63°)
OKLaboklab(39.16% 0.0393 -0.1616)
OKLCHoklch(39.16% 0.166 283.7)
XYZxyz(8.8007, 5.2661, 30.6835)
Luminance0.0527 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D99 #86992D
analogous
#2D5099 #402D99 #762D99
triadic
#402D99 #99402D #2D9940
tetradic
#402D99 #992D50 #86992D #2D9976
square
#402D99 #992D50 #86992D #2D9976
split-complementary
#402D99 #99762D #50992D
monochromatic
#18113A #2C1F6A #402D99 #553DC6 #7F6CD4

Accessibility & contrast

On white

10.23
#402D99 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#402D99 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D99
10.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D99#FFFFFF#000000##FFFFFF
##402D991.0010.232.0510.23
#FFFFFF10.231.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00449C
Deuteranopia (green-blind)
#003D97
Tritanopia (blue-blind)
#11495F
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402d99;
/* rgb */ color: rgb(64, 45, 153);
/* oklch */ color: oklch(39.2% 0.166 283.7);
Tailwind
colors: {
  custom: {
    50: '#7f68b8',
    500: '#402d99',
    950: '#000000',
  },
}
SCSS
$custom: #402d99;
$custom-light: #7f68b8;
$custom-dark: #000000;
JSON
{
  "hex": "#402d99",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 153
  },
  "hsl": {
    "h": 250.556,
    "s": 54.545,
    "l": 38.824
  },
  "oklch": {
    "l": 0.3916,
    "c": 0.16633,
    "h": 283.7
  },
  "luminance": 0.05267
}

Semantic roles & 50–950 ramp

primary
#402D99
secondary
#ACBB67
accent
#DE4AC4
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402D99

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

Preview Lab → · Contrast checker → · Palette generator →

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