#402D91#402D91

#402D91 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.4% C 0.156 H 285.1°. Best body text is #FFFFFF at 10.49:1 contrast (WCAG AA passes).

Color values

HEX#402D91
RGBrgb(64, 45, 145)
HSLhsl(251, 53%, 37%)
HSVhsv(251, 69%, 57%)
CMYKcmyk(55.9%, 69%, 0%, 43.1%)
CIE-LABlab(26.76, 36.26, -52.41)
CIE-LCHlch(26.76, 63.73, 304.68°)
OKLaboklab(38.43% 0.0406 -0.1506)
OKLCHoklch(38.43% 0.156 285.1)
XYZxyz(8.1620, 5.0106, 27.3196)
Luminance0.0501 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D91 #7E912D
analogous
#2D4C91 #402D91 #722D91
triadic
#402D91 #91402D #2D9140
tetradic
#402D91 #912D4C #7E912D #2D9172
square
#402D91 #912D4C #7E912D #2D9172
split-complementary
#402D91 #91722D #4C912D
monochromatic
#171034 #2B1F62 #402D91 #553BC0 #7C68D0

Accessibility & contrast

On white

10.49
#402D91 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#402D91 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D91
10.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D91#FFFFFF#000000##FFFFFF
##402D911.0010.492.0010.49
#FFFFFF10.491.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.491.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402d91;
/* rgb */ color: rgb(64, 45, 145);
/* oklch */ color: oklch(38.4% 0.156 285.1);
Tailwind
colors: {
  custom: {
    50: '#7d67b2',
    500: '#402d91',
    950: '#000000',
  },
}
SCSS
$custom: #402d91;
$custom-light: #7d67b2;
$custom-dark: #000000;
JSON
{
  "hex": "#402d91",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 145
  },
  "hsl": {
    "h": 251.4,
    "s": 52.632,
    "l": 37.255
  },
  "oklch": {
    "l": 0.38427,
    "c": 0.15603,
    "h": 285.1
  },
  "luminance": 0.05011
}

Semantic roles & 50–950 ramp

primary
#402D91
secondary
#A7B763
accent
#DC4CC1
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402D91

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

Preview Lab → · Contrast checker → · Palette generator →

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