#402E84#402E84

#402E84 is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.5% C 0.137 H 287.4°. Best body text is #FFFFFF at 10.81:1 contrast (WCAG AA passes).

Color values

HEX#402E84
RGBrgb(64, 46, 132)
HSLhsl(253, 48%, 35%)
HSVhsv(253, 65%, 52%)
CMYKcmyk(51.5%, 65.2%, 0%, 48.2%)
CIE-LABlab(25.89, 31.53, -45.76)
CIE-LCHlch(25.89, 55.57, 304.57°)
OKLaboklab(37.45% 0.0412 -0.1311)
OKLCHoklch(37.45% 0.137 287.4)
XYZxyz(7.2550, 4.7096, 22.3521)
Luminance0.0471 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E84 #72842E
analogous
#2E4784 #402E84 #6B2E84
triadic
#402E84 #84402E #2E8440
tetradic
#402E84 #842E47 #72842E #2E846B
square
#402E84 #842E47 #72842E #2E846B
split-complementary
#402E84 #846B2E #47842E
monochromatic
#140E29 #2A1E57 #402E84 #563EB1 #7964C9

Accessibility & contrast

On white

10.81
#402E84 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#402E84 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E84
10.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E84#FFFFFF#000000##FFFFFF
##402E841.0010.811.9410.81
#FFFFFF10.811.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.811.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402e84;
/* rgb */ color: rgb(64, 46, 132);
/* oklch */ color: oklch(37.5% 0.137 287.4);
Tailwind
colors: {
  custom: {
    50: '#7b68a8',
    500: '#402e84',
    950: '#000000',
  },
}
SCSS
$custom: #402e84;
$custom-light: #7b68a8;
$custom-dark: #000000;
JSON
{
  "hex": "#402e84",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 132
  },
  "hsl": {
    "h": 252.558,
    "s": 48.315,
    "l": 34.902
  },
  "oklch": {
    "l": 0.37452,
    "c": 0.13741,
    "h": 287.4
  },
  "luminance": 0.0471
}

Semantic roles & 50–950 ramp

primary
#402E84
secondary
#9FB05E
accent
#D850BB
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402E84

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

Preview Lab → · Contrast checker → · Palette generator →

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