#402D84#402D84

#402D84 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.3% C 0.139 H 287.7°. Best body text is #FFFFFF at 10.90:1 contrast (WCAG AA passes).

Color values

HEX#402D84
RGBrgb(64, 45, 132)
HSLhsl(253, 49%, 35%)
HSVhsv(253, 66%, 52%)
CMYKcmyk(51.5%, 65.9%, 0%, 48.2%)
CIE-LABlab(25.66, 32.15, -46.13)
CIE-LCHlch(25.66, 56.23, 304.87°)
OKLaboklab(37.29% 0.0423 -0.1322)
OKLCHoklch(37.29% 0.139 287.7)
XYZxyz(7.2164, 4.6324, 22.3392)
Luminance0.0463 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D84 #71842D
analogous
#2D4684 #402D84 #6B2D84
triadic
#402D84 #84402D #2D8440
tetradic
#402D84 #842D46 #71842D #2D846B
square
#402D84 #842D46 #71842D #2D846B
split-complementary
#402D84 #846B2D #46842D
monochromatic
#140E29 #2A1D56 #402D84 #563DB2 #7962C9

Accessibility & contrast

On white

10.90
#402D84 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#402D84 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D84
10.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D84#FFFFFF#000000##FFFFFF
##402D841.0010.901.9310.90
#FFFFFF10.901.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F87
Deuteranopia (green-blind)
#003A82
Tritanopia (blue-blind)
#284254
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402d84;
/* rgb */ color: rgb(64, 45, 132);
/* oklch */ color: oklch(37.3% 0.139 287.7);
Tailwind
colors: {
  custom: {
    50: '#7b67a8',
    500: '#402d84',
    950: '#000000',
  },
}
SCSS
$custom: #402d84;
$custom-light: #7b67a8;
$custom-dark: #000000;
JSON
{
  "hex": "#402d84",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 132
  },
  "hsl": {
    "h": 253.103,
    "s": 49.153,
    "l": 34.706
  },
  "oklch": {
    "l": 0.37285,
    "c": 0.1388,
    "h": 287.7
  },
  "luminance": 0.04633
}

Semantic roles & 50–950 ramp

primary
#402D84
secondary
#9EB05D
accent
#D94FBB
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402D84

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

Preview Lab → · Contrast checker → · Palette generator →

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