#402A99#402A99

#402A99 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.7% C 0.170 H 284.3°. Best body text is #FFFFFF at 10.45:1 contrast (WCAG AA passes).

Color values

HEX#402A99
RGBrgb(64, 42, 153)
HSLhsl(252, 57%, 38%)
HSVhsv(252, 73%, 60%)
CMYKcmyk(58.2%, 72.5%, 0%, 40%)
CIE-LABlab(26.86, 40.50, -57.17)
CIE-LCHlch(26.86, 70.06, 305.31°)
OKLaboklab(38.72% 0.0418 -0.1646)
OKLCHoklch(38.72% 0.17 284.3)
XYZxyz(8.6903, 5.0453, 30.6467)
Luminance0.0505 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A99 #83992A
analogous
#2A4B99 #402A99 #772A99
triadic
#402A99 #99402A #2A9940
tetradic
#402A99 #992A4B #83992A #2A9977
square
#402A99 #992A4B #83992A #2A9977
split-complementary
#402A99 #99772A #4B992A
monochromatic
#181039 #2C1D69 #402A99 #5438C8 #7E68D6

Accessibility & contrast

On white

10.45
#402A99 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#402A99 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A99
10.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A99#FFFFFF#000000##FFFFFF
##402A991.0010.452.0110.45
#FFFFFF10.451.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439C
Deuteranopia (green-blind)
#003C97
Tritanopia (blue-blind)
#11485E
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #402a99;
/* rgb */ color: rgb(64, 42, 153);
/* oklch */ color: oklch(38.7% 0.170 284.3);
Tailwind
colors: {
  custom: {
    50: '#7f66b8',
    500: '#402a99',
    950: '#000000',
  },
}
SCSS
$custom: #402a99;
$custom-light: #7f66b8;
$custom-dark: #000000;
JSON
{
  "hex": "#402a99",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 153
  },
  "hsl": {
    "h": 251.892,
    "s": 56.923,
    "l": 38.235
  },
  "oklch": {
    "l": 0.3872,
    "c": 0.16981,
    "h": 284.3
  },
  "luminance": 0.05046
}

Semantic roles & 50–950 ramp

primary
#402A99
secondary
#AABC63
accent
#E048C2
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402A99

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

Preview Lab → · Contrast checker → · Palette generator →

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