#402B99#402B99

#402B99 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.9% C 0.169 H 284.1°. Best body text is #FFFFFF at 10.38:1 contrast (WCAG AA passes).

Color values

HEX#402B99
RGBrgb(64, 43, 153)
HSLhsl(251, 56%, 38%)
HSVhsv(251, 72%, 60%)
CMYKcmyk(58.2%, 71.9%, 0%, 40%)
CIE-LABlab(27.07, 39.93, -56.84)
CIE-LCHlch(27.07, 69.46, 305.09°)
OKLaboklab(38.86% 0.041 -0.1636)
OKLCHoklch(38.86% 0.169 284.1)
XYZxyz(8.7262, 5.1171, 30.6587)
Luminance0.0512 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402B99 #84992B
analogous
#2B4D99 #402B99 #772B99
triadic
#402B99 #99402B #2B9940
tetradic
#402B99 #992B4D #84992B #2B9977
square
#402B99 #992B4D #84992B #2B9977
split-complementary
#402B99 #99772B #4D992B
monochromatic
#181039 #2C1E69 #402B99 #553AC8 #7E69D5

Accessibility & contrast

On white

10.38
#402B99 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#402B99 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402B99
10.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402B99#FFFFFF#000000##FFFFFF
##402B991.0010.382.0210.38
#FFFFFF10.381.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439C
Deuteranopia (green-blind)
#003C97
Tritanopia (blue-blind)
#11485F
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #402b99;
/* rgb */ color: rgb(64, 43, 153);
/* oklch */ color: oklch(38.9% 0.169 284.1);
Tailwind
colors: {
  custom: {
    50: '#7f66b8',
    500: '#402b99',
    950: '#000000',
  },
}
SCSS
$custom: #402b99;
$custom-light: #7f66b8;
$custom-dark: #000000;
JSON
{
  "hex": "#402b99",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 153
  },
  "hsl": {
    "h": 251.455,
    "s": 56.122,
    "l": 38.431
  },
  "oklch": {
    "l": 0.38864,
    "c": 0.16867,
    "h": 284.1
  },
  "luminance": 0.05118
}

Semantic roles & 50–950 ramp

primary
#402B99
secondary
#ABBC64
accent
#DF48C3
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402B99

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

Preview Lab → · Contrast checker → · Palette generator →

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