#402AA2#402AA2

#402AA2 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.6% C 0.181 H 282.7°. Best body text is #FFFFFF at 10.14:1 contrast (WCAG AA passes).

Color values

HEX#402AA2
RGBrgb(64, 42, 162)
HSLhsl(251, 59%, 40%)
HSVhsv(251, 74%, 64%)
CMYKcmyk(60.5%, 74.1%, 0%, 36.5%)
CIE-LABlab(27.72, 43.28, -61.25)
CIE-LCHlch(27.72, 75.00, 305.25°)
OKLaboklab(39.59% 0.0398 -0.1765)
OKLCHoklch(39.59% 0.181 282.7)
XYZxyz(9.4619, 5.3539, 34.7102)
Luminance0.0536 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AA2 #8CA22A
analogous
#2A50A2 #402AA2 #7C2AA2
triadic
#402AA2 #A2402A #2AA240
tetradic
#402AA2 #A22A50 #8CA22A #2AA27C
square
#402AA2 #A22A50 #8CA22A #2AA27C
split-complementary
#402AA2 #A27C2A #50A22A
monochromatic
#1A1141 #2D1D71 #402AA2 #573DCD #816DD9

Accessibility & contrast

On white

10.14
#402AA2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#402AA2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AA2
10.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AA2#FFFFFF#000000##FFFFFF
##402AA21.0010.142.0710.14
#FFFFFF10.141.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0045A5
Deuteranopia (green-blind)
#003DA0
Tritanopia (blue-blind)
#004B63
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402aa2;
/* rgb */ color: rgb(64, 42, 162);
/* oklch */ color: oklch(39.6% 0.181 282.7);
Tailwind
colors: {
  custom: {
    50: '#8166bf',
    500: '#402aa2',
    950: '#000000',
  },
}
SCSS
$custom: #402aa2;
$custom-light: #8166bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402aa2",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 162
  },
  "hsl": {
    "h": 251,
    "s": 58.824,
    "l": 40
  },
  "oklch": {
    "l": 0.39589,
    "c": 0.18096,
    "h": 282.7
  },
  "luminance": 0.05355
}

Semantic roles & 50–950 ramp

primary
#402AA2
secondary
#B0C068
accent
#E246C5
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402AA2

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

Preview Lab → · Contrast checker → · Palette generator →

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