#402A84#402A84

#402A84 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 36.8% C 0.143 H 288.6°. Best body text is #FFFFFF at 11.16:1 contrast (WCAG AA passes).

Color values

HEX#402A84
RGBrgb(64, 42, 132)
HSLhsl(255, 52%, 34%)
HSVhsv(255, 68%, 52%)
CMYKcmyk(51.5%, 68.2%, 0%, 48.2%)
CIE-LABlab(24.99, 33.96, -47.23)
CIE-LCHlch(24.99, 58.17, 305.72°)
OKLaboklab(36.8% 0.0455 -0.1354)
OKLCHoklch(36.8% 0.143 288.6)
XYZxyz(7.1060, 4.4115, 22.3024)
Luminance0.0441 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A84 #6E842A
analogous
#2A4184 #402A84 #6D2A84
triadic
#402A84 #84402A #2A8440
tetradic
#402A84 #842A41 #6E842A #2A846D
square
#402A84 #842A41 #6E842A #2A846D
split-complementary
#402A84 #846D2A #41842A
monochromatic
#130C27 #291B56 #402A84 #5739B2 #785DCB

Accessibility & contrast

On white

11.16
#402A84 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.88
#402A84 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A84
11.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A84#FFFFFF#000000##FFFFFF
##402A841.0011.161.8811.16
#FFFFFF11.161.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D87
Deuteranopia (green-blind)
#003982
Tritanopia (blue-blind)
#284053
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402a84;
/* rgb */ color: rgb(64, 42, 132);
/* oklch */ color: oklch(36.8% 0.143 288.6);
Tailwind
colors: {
  custom: {
    50: '#7c65a9',
    500: '#402a84',
    950: '#000000',
  },
}
SCSS
$custom: #402a84;
$custom-light: #7c65a9;
$custom-dark: #000000;
JSON
{
  "hex": "#402a84",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 132
  },
  "hsl": {
    "h": 254.667,
    "s": 51.724,
    "l": 34.118
  },
  "oklch": {
    "l": 0.36798,
    "c": 0.14286,
    "h": 288.6
  },
  "luminance": 0.04412
}

Semantic roles & 50–950 ramp

primary
#402A84
secondary
#9BB159
accent
#DB4DB8
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402A84

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

Preview Lab → · Contrast checker → · Palette generator →

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