#402AA1#402AA1

#402AA1 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.5% C 0.180 H 282.9°. Best body text is #FFFFFF at 10.18:1 contrast (WCAG AA passes).

Color values

HEX#402AA1
RGBrgb(64, 42, 161)
HSLhsl(251, 59%, 40%)
HSVhsv(251, 74%, 63%)
CMYKcmyk(60.2%, 73.9%, 0%, 36.9%)
CIE-LABlab(27.62, 42.97, -60.80)
CIE-LCHlch(27.62, 74.45, 305.25°)
OKLaboklab(39.49% 0.0401 -0.1752)
OKLCHoklch(39.49% 0.18 282.9)
XYZxyz(9.3733, 5.3185, 34.2439)
Luminance0.0532 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AA1 #8BA12A
analogous
#2A50A1 #402AA1 #7B2AA1
triadic
#402AA1 #A1402A #2AA140
tetradic
#402AA1 #A12A50 #8BA12A #2AA17B
square
#402AA1 #A12A50 #8BA12A #2AA17B
split-complementary
#402AA1 #A17B2A #50A12A
monochromatic
#191140 #2D1D70 #402AA1 #573CCC #816DD9

Accessibility & contrast

On white

10.18
#402AA1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#402AA1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AA1
10.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AA1#FFFFFF#000000##FFFFFF
##402AA11.0010.182.0610.18
#FFFFFF10.181.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.181.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402aa1;
/* rgb */ color: rgb(64, 42, 161);
/* oklch */ color: oklch(39.5% 0.180 282.9);
Tailwind
colors: {
  custom: {
    50: '#8166be',
    500: '#402aa1',
    950: '#000000',
  },
}
SCSS
$custom: #402aa1;
$custom-light: #8166be;
$custom-dark: #000000;
JSON
{
  "hex": "#402aa1",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 161
  },
  "hsl": {
    "h": 251.092,
    "s": 58.621,
    "l": 39.804
  },
  "oklch": {
    "l": 0.39491,
    "c": 0.17973,
    "h": 282.9
  },
  "luminance": 0.05319
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402AA1

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

Preview Lab → · Contrast checker → · Palette generator →

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