#402AA4#402AA4

#402AA4 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.8% C 0.183 H 282.4°. Best body text is #FFFFFF at 10.07:1 contrast (WCAG AA passes).

Color values

HEX#402AA4
RGBrgb(64, 42, 164)
HSLhsl(251, 59%, 40%)
HSVhsv(251, 74%, 64%)
CMYKcmyk(61%, 74.4%, 0%, 35.7%)
CIE-LABlab(27.91, 43.90, -62.14)
CIE-LCHlch(27.91, 76.08, 305.24°)
OKLaboklab(39.78% 0.0394 -0.1791)
OKLCHoklch(39.78% 0.183 282.4)
XYZxyz(9.6411, 5.4256, 35.6540)
Luminance0.0543 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AA4 #8EA42A
analogous
#2A51A4 #402AA4 #7D2AA4
triadic
#402AA4 #A4402A #2AA440
tetradic
#402AA4 #A42A51 #8EA42A #2AA47D
square
#402AA4 #A42A51 #8EA42A #2AA47D
split-complementary
#402AA4 #A47D2A #51A42A
monochromatic
#1A1143 #2D1E73 #402AA4 #583ECD #826EDA

Accessibility & contrast

On white

10.07
#402AA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#402AA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AA4
10.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AA4#FFFFFF#000000##FFFFFF
##402AA41.0010.072.0910.07
#FFFFFF10.071.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A8
Deuteranopia (green-blind)
#003EA2
Tritanopia (blue-blind)
#004C65
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402aa4;
/* rgb */ color: rgb(64, 42, 164);
/* oklch */ color: oklch(39.8% 0.183 282.4);
Tailwind
colors: {
  custom: {
    50: '#8166c0',
    500: '#402aa4',
    950: '#000000',
  },
}
SCSS
$custom: #402aa4;
$custom-light: #8166c0;
$custom-dark: #000000;
JSON
{
  "hex": "#402aa4",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 164
  },
  "hsl": {
    "h": 250.82,
    "s": 59.223,
    "l": 40.392
  },
  "oklch": {
    "l": 0.39785,
    "c": 0.18341,
    "h": 282.4
  },
  "luminance": 0.05426
}

Semantic roles & 50–950 ramp

primary
#402AA4
secondary
#B1C169
accent
#E245C6
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #402AA4

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

Preview Lab → · Contrast checker → · Palette generator →

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