#402AA3#402AA3

#402AA3 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.7% C 0.182 H 282.6°. Best body text is #FFFFFF at 10.11:1 contrast (WCAG AA passes).

Color values

HEX#402AA3
RGBrgb(64, 42, 163)
HSLhsl(251, 59%, 40%)
HSVhsv(251, 74%, 64%)
CMYKcmyk(60.7%, 74.2%, 0%, 36.1%)
CIE-LABlab(27.82, 43.59, -61.69)
CIE-LCHlch(27.82, 75.54, 305.24°)
OKLaboklab(39.69% 0.0396 -0.1778)
OKLCHoklch(39.69% 0.182 282.6)
XYZxyz(9.5511, 5.3896, 35.1802)
Luminance0.0539 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AA3 #8DA32A
analogous
#2A51A3 #402AA3 #7C2AA3
triadic
#402AA3 #A3402A #2AA340
tetradic
#402AA3 #A32A51 #8DA32A #2AA37C
square
#402AA3 #A32A51 #8DA32A #2AA37C
split-complementary
#402AA3 #A37C2A #51A32A
monochromatic
#1A1142 #2D1D72 #402AA3 #573DCD #816EDA

Accessibility & contrast

On white

10.11
#402AA3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#402AA3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AA3
10.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AA3#FFFFFF#000000##FFFFFF
##402AA31.0010.112.0810.11
#FFFFFF10.111.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A7
Deuteranopia (green-blind)
#003DA1
Tritanopia (blue-blind)
#004C64
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402aa3;
/* rgb */ color: rgb(64, 42, 163);
/* oklch */ color: oklch(39.7% 0.182 282.6);
Tailwind
colors: {
  custom: {
    50: '#8166bf',
    500: '#402aa3',
    950: '#000000',
  },
}
SCSS
$custom: #402aa3;
$custom-light: #8166bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402aa3",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 163
  },
  "hsl": {
    "h": 250.909,
    "s": 59.024,
    "l": 40.196
  },
  "oklch": {
    "l": 0.39687,
    "c": 0.18218,
    "h": 282.6
  },
  "luminance": 0.0539
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402AA3

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

Preview Lab → · Contrast checker → · Palette generator →

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