#402A91#402A91

#402A91 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.0% C 0.160 H 285.8°. Best body text is #FFFFFF at 10.73:1 contrast (WCAG AA passes).

Color values

HEX#402A91
RGBrgb(64, 42, 145)
HSLhsl(253, 55%, 37%)
HSVhsv(253, 71%, 57%)
CMYKcmyk(55.9%, 71%, 0%, 43.1%)
CIE-LABlab(26.13, 38.01, -53.45)
CIE-LCHlch(26.13, 65.59, 305.42°)
OKLaboklab(37.97% 0.0434 -0.1537)
OKLCHoklch(37.97% 0.16 285.8)
XYZxyz(8.0516, 4.7898, 27.2828)
Luminance0.0479 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A91 #7B912A
analogous
#2A4791 #402A91 #742A91
triadic
#402A91 #91402A #2A9140
tetradic
#402A91 #912A47 #7B912A #2A9174
square
#402A91 #912A47 #7B912A #2A9174
split-complementary
#402A91 #91742A #47912A
monochromatic
#160F32 #2B1C62 #402A91 #5538C0 #7B63D2

Accessibility & contrast

On white

10.73
#402A91 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#402A91 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A91
10.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A91#FFFFFF#000000##FFFFFF
##402A911.0010.731.9610.73
#FFFFFF10.731.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004194
Deuteranopia (green-blind)
#003B8F
Tritanopia (blue-blind)
#1D455A
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402a91;
/* rgb */ color: rgb(64, 42, 145);
/* oklch */ color: oklch(38.0% 0.160 285.8);
Tailwind
colors: {
  custom: {
    50: '#7e65b2',
    500: '#402a91',
    950: '#000000',
  },
}
SCSS
$custom: #402a91;
$custom-light: #7e65b2;
$custom-dark: #000000;
JSON
{
  "hex": "#402a91",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 145
  },
  "hsl": {
    "h": 252.816,
    "s": 55.08,
    "l": 36.667
  },
  "oklch": {
    "l": 0.37969,
    "c": 0.15971,
    "h": 285.8
  },
  "luminance": 0.0479
}

Semantic roles & 50–950 ramp

primary
#402A91
secondary
#A5B85F
accent
#DE49BF
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402A91

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

Preview Lab → · Contrast checker → · Palette generator →

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