#402AA0#402AA0

#402AA0 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.4% C 0.178 H 283.0°. Best body text is #FFFFFF at 10.21:1 contrast (WCAG AA passes).

Color values

HEX#402AA0
RGBrgb(64, 42, 160)
HSLhsl(251, 58%, 40%)
HSVhsv(251, 74%, 63%)
CMYKcmyk(60%, 73.8%, 0%, 37.3%)
CIE-LABlab(27.53, 42.66, -60.35)
CIE-LCHlch(27.53, 73.91, 305.26°)
OKLaboklab(39.39% 0.0403 -0.1739)
OKLCHoklch(39.39% 0.179 283)
XYZxyz(9.2855, 5.2834, 33.7814)
Luminance0.0528 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AA0 #8AA02A
analogous
#2A4FA0 #402AA0 #7B2AA0
triadic
#402AA0 #A0402A #2AA040
tetradic
#402AA0 #A02A4F #8AA02A #2AA07B
square
#402AA0 #A02A4F #8AA02A #2AA07B
split-complementary
#402AA0 #A07B2A #4FA02A
monochromatic
#19113F #2D1D70 #402AA0 #563CCC #806CD8

Accessibility & contrast

On white

10.21
#402AA0 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402AA0
10.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AA0#FFFFFF#000000##FFFFFF
##402AA01.0010.212.0610.21
#FFFFFF10.211.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0045A3
Deuteranopia (green-blind)
#003D9E
Tritanopia (blue-blind)
#004B62
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402aa0;
/* rgb */ color: rgb(64, 42, 160);
/* oklch */ color: oklch(39.4% 0.178 283.0);
Tailwind
colors: {
  custom: {
    50: '#8066bd',
    500: '#402aa0',
    950: '#000000',
  },
}
SCSS
$custom: #402aa0;
$custom-light: #8066bd;
$custom-dark: #000000;
JSON
{
  "hex": "#402aa0",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 160
  },
  "hsl": {
    "h": 251.186,
    "s": 58.416,
    "l": 39.608
  },
  "oklch": {
    "l": 0.39394,
    "c": 0.1785,
    "h": 283
  },
  "luminance": 0.05284
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402AA0

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

Preview Lab → · Contrast checker → · Palette generator →

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