#402A96#402A96

#402A96 is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.4% C 0.166 H 284.8°. Best body text is #FFFFFF at 10.55:1 contrast (WCAG AA passes).

Color values

HEX#402A96
RGBrgb(64, 42, 150)
HSLhsl(252, 56%, 38%)
HSVhsv(252, 72%, 59%)
CMYKcmyk(57.3%, 72%, 0%, 41.2%)
CIE-LABlab(26.58, 39.57, -55.79)
CIE-LCHlch(26.58, 68.39, 305.35°)
OKLaboklab(38.44% 0.0424 -0.1605)
OKLCHoklch(38.44% 0.166 284.8)
XYZxyz(8.4457, 4.9474, 29.3582)
Luminance0.0495 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A96 #80962A
analogous
#2A4A96 #402A96 #762A96
triadic
#402A96 #96402A #2A9640
tetradic
#402A96 #962A4A #80962A #2A9676
square
#402A96 #962A4A #80962A #2A9676
split-complementary
#402A96 #96762A #4A962A
monochromatic
#170F36 #2C1D66 #402A96 #5437C6 #7D66D4

Accessibility & contrast

On white

10.55
#402A96 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.99
#402A96 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A96
10.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A96#FFFFFF#000000##FFFFFF
##402A961.0010.551.9910.55
#FFFFFF10.551.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004299
Deuteranopia (green-blind)
#003B94
Tritanopia (blue-blind)
#16475D
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #402a96;
/* rgb */ color: rgb(64, 42, 150);
/* oklch */ color: oklch(38.4% 0.166 284.8);
Tailwind
colors: {
  custom: {
    50: '#7f66b6',
    500: '#402a96',
    950: '#000000',
  },
}
SCSS
$custom: #402a96;
$custom-light: #7f66b6;
$custom-dark: #000000;
JSON
{
  "hex": "#402a96",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 150
  },
  "hsl": {
    "h": 252.222,
    "s": 56.25,
    "l": 37.647
  },
  "oklch": {
    "l": 0.38436,
    "c": 0.16604,
    "h": 284.8
  },
  "luminance": 0.04948
}

Semantic roles & 50–950 ramp

primary
#402A96
secondary
#A8BA61
accent
#E048C1
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402A96

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

Preview Lab → · Contrast checker → · Palette generator →

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