#402B95#402B95

#402B95 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.5% C 0.164 H 284.8°. Best body text is #FFFFFF at 10.51:1 contrast (WCAG AA passes).

Color values

HEX#402B95
RGBrgb(64, 43, 149)
HSLhsl(252, 55%, 38%)
HSVhsv(252, 71%, 58%)
CMYKcmyk(57%, 71.1%, 0%, 41.6%)
CIE-LABlab(26.70, 38.68, -54.98)
CIE-LCHlch(26.70, 67.23, 305.13°)
OKLaboklab(38.49% 0.0418 -0.1582)
OKLCHoklch(38.49% 0.164 284.8)
XYZxyz(8.4014, 4.9872, 28.9479)
Luminance0.0499 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402B95 #80952B
analogous
#2B4B95 #402B95 #752B95
triadic
#402B95 #95402B #2B9540
tetradic
#402B95 #952B4B #80952B #2B9575
square
#402B95 #952B4B #80952B #2B9575
split-complementary
#402B95 #95752B #4B952B
monochromatic
#171036 #2C1D66 #402B95 #5439C4 #7D67D3

Accessibility & contrast

On white

10.51
#402B95 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402B95
10.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402B95#FFFFFF#000000##FFFFFF
##402B951.0010.512.0010.51
#FFFFFF10.511.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004298
Deuteranopia (green-blind)
#003C93
Tritanopia (blue-blind)
#17475D
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #402b95;
/* rgb */ color: rgb(64, 43, 149);
/* oklch */ color: oklch(38.5% 0.164 284.8);
Tailwind
colors: {
  custom: {
    50: '#7e66b5',
    500: '#402b95',
    950: '#000000',
  },
}
SCSS
$custom: #402b95;
$custom-light: #7e66b5;
$custom-dark: #000000;
JSON
{
  "hex": "#402b95",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 149
  },
  "hsl": {
    "h": 251.887,
    "s": 55.208,
    "l": 37.647
  },
  "oklch": {
    "l": 0.38489,
    "c": 0.16361,
    "h": 284.8
  },
  "luminance": 0.04988
}

Semantic roles & 50–950 ramp

primary
#402B95
secondary
#A8BA62
accent
#DF49C1
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402B95

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

Preview Lab → · Contrast checker → · Palette generator →

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