#402AA5#402AA5

#402AA5 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.9% C 0.185 H 282.2°. Best body text is #FFFFFF at 10.04:1 contrast (WCAG AA passes).

Color values

HEX#402AA5
RGBrgb(64, 42, 165)
HSLhsl(251, 59%, 41%)
HSVhsv(251, 75%, 65%)
CMYKcmyk(61.2%, 74.5%, 0%, 35.3%)
CIE-LABlab(28.01, 44.20, -62.58)
CIE-LCHlch(28.01, 76.62, 305.24°)
OKLaboklab(39.88% 0.0392 -0.1804)
OKLCHoklch(39.88% 0.185 282.2)
XYZxyz(9.7317, 5.4619, 36.1314)
Luminance0.0546 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AA5 #8FA52A
analogous
#2A51A5 #402AA5 #7D2AA5
triadic
#402AA5 #A5402A #2AA540
tetradic
#402AA5 #A52A51 #8FA52A #2AA57D
square
#402AA5 #A52A51 #8FA52A #2AA57D
split-complementary
#402AA5 #A57D2A #51A52A
monochromatic
#1A1143 #2D1E74 #402AA5 #583ECE #826FDA

Accessibility & contrast

On white

10.04
#402AA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402AA5
10.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AA5#FFFFFF#000000##FFFFFF
##402AA51.0010.042.0910.04
#FFFFFF10.041.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.041.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402aa5;
/* rgb */ color: rgb(64, 42, 165);
/* oklch */ color: oklch(39.9% 0.185 282.2);
Tailwind
colors: {
  custom: {
    50: '#8166c1',
    500: '#402aa5',
    950: '#000000',
  },
}
SCSS
$custom: #402aa5;
$custom-light: #8166c1;
$custom-dark: #000000;
JSON
{
  "hex": "#402aa5",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 165
  },
  "hsl": {
    "h": 250.732,
    "s": 59.42,
    "l": 40.588
  },
  "oklch": {
    "l": 0.39884,
    "c": 0.18463,
    "h": 282.2
  },
  "luminance": 0.05463
}

Semantic roles & 50–950 ramp

primary
#402AA5
secondary
#B2C169
accent
#E345C6
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #402AA5

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

Preview Lab → · Contrast checker → · Palette generator →

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