#402C91#402C91

#402C91 is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.3% C 0.157 H 285.3°. Best body text is #FFFFFF at 10.57:1 contrast (WCAG AA passes).

Color values

HEX#402C91
RGBrgb(64, 44, 145)
HSLhsl(252, 53%, 37%)
HSVhsv(252, 70%, 57%)
CMYKcmyk(55.9%, 69.7%, 0%, 43.1%)
CIE-LABlab(26.55, 36.85, -52.76)
CIE-LCHlch(26.55, 64.36, 304.93°)
OKLaboklab(38.27% 0.0415 -0.1517)
OKLCHoklch(38.27% 0.157 285.3)
XYZxyz(8.1243, 4.9352, 27.3071)
Luminance0.0494 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C91 #7D912C
analogous
#2C4B91 #402C91 #732C91
triadic
#402C91 #91402C #2C9140
tetradic
#402C91 #912C4B #7D912C #2C9173
square
#402C91 #912C4B #7D912C #2C9173
split-complementary
#402C91 #91732C #4B912C
monochromatic
#171033 #2B1E62 #402C91 #553AC0 #7C67D1

Accessibility & contrast

On white

10.57
#402C91 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402C91
10.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C91#FFFFFF#000000##FFFFFF
##402C911.0010.571.9910.57
#FFFFFF10.571.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004294
Deuteranopia (green-blind)
#003C8F
Tritanopia (blue-blind)
#1C465B
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #402c91;
/* rgb */ color: rgb(64, 44, 145);
/* oklch */ color: oklch(38.3% 0.157 285.3);
Tailwind
colors: {
  custom: {
    50: '#7e67b2',
    500: '#402c91',
    950: '#000000',
  },
}
SCSS
$custom: #402c91;
$custom-light: #7e67b2;
$custom-dark: #000000;
JSON
{
  "hex": "#402c91",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 145
  },
  "hsl": {
    "h": 251.881,
    "s": 53.439,
    "l": 37.059
  },
  "oklch": {
    "l": 0.38272,
    "c": 0.15727,
    "h": 285.3
  },
  "luminance": 0.04936
}

Semantic roles & 50–950 ramp

primary
#402C91
secondary
#A6B762
accent
#DD4BC0
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402C91

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

Preview Lab → · Contrast checker → · Palette generator →

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