#402AA6#402AA6

#402AA6 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 40.0% C 0.186 H 282.1°. Best body text is #FFFFFF at 10.00:1 contrast (WCAG AA passes).

Color values

HEX#402AA6
RGBrgb(64, 42, 166)
HSLhsl(251, 60%, 41%)
HSVhsv(251, 75%, 65%)
CMYKcmyk(61.4%, 74.7%, 0%, 34.9%)
CIE-LABlab(28.11, 44.51, -63.02)
CIE-LCHlch(28.11, 77.16, 305.23°)
OKLaboklab(39.98% 0.0389 -0.1817)
OKLCHoklch(39.98% 0.186 282.1)
XYZxyz(9.8231, 5.4984, 36.6127)
Luminance0.0550 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AA6 #90A62A
analogous
#2A52A6 #402AA6 #7E2AA6
triadic
#402AA6 #A6402A #2AA640
tetradic
#402AA6 #A62A52 #90A62A #2AA67E
square
#402AA6 #A62A52 #90A62A #2AA67E
split-complementary
#402AA6 #A67E2A #52A62A
monochromatic
#1A1144 #2D1E75 #402AA6 #583FCE #8370DB

Accessibility & contrast

On white

10.00
#402AA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.10
#402AA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AA6
10.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AA6#FFFFFF#000000##FFFFFF
##402AA61.0010.002.1010.00
#FFFFFF10.001.0021.001.00
#0000002.1021.001.0021.00
##FFFFFF10.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046AA
Deuteranopia (green-blind)
#003EA4
Tritanopia (blue-blind)
#004D66
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402aa6;
/* rgb */ color: rgb(64, 42, 166);
/* oklch */ color: oklch(40.0% 0.186 282.1);
Tailwind
colors: {
  custom: {
    50: '#8166c2',
    500: '#402aa6',
    950: '#000000',
  },
}
SCSS
$custom: #402aa6;
$custom-light: #8166c2;
$custom-dark: #000000;
JSON
{
  "hex": "#402aa6",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 166
  },
  "hsl": {
    "h": 250.645,
    "s": 59.615,
    "l": 40.784
  },
  "oklch": {
    "l": 0.39982,
    "c": 0.18584,
    "h": 282.1
  },
  "luminance": 0.05499
}

Semantic roles & 50–950 ramp

primary
#402AA6
secondary
#B2C26A
accent
#E345C7
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #402AA6

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

Preview Lab → · Contrast checker → · Palette generator →

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