#402B9D#402B9D

#402B9D is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.2% C 0.174 H 283.4°. Best body text is #FFFFFF at 10.24:1 contrast (WCAG AA passes).

Color values

HEX#402B9D
RGBrgb(64, 43, 157)
HSLhsl(251, 57%, 39%)
HSVhsv(251, 73%, 62%)
CMYKcmyk(59.2%, 72.6%, 0%, 38.4%)
CIE-LABlab(27.44, 41.18, -58.67)
CIE-LCHlch(27.44, 71.68, 305.07°)
OKLaboklab(39.24% 0.0402 -0.169)
OKLCHoklch(39.24% 0.174 283.4)
XYZxyz(9.0622, 5.2515, 32.4279)
Luminance0.0525 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402B9D #889D2B
analogous
#2B4F9D #402B9D #792B9D
triadic
#402B9D #9D402B #2B9D40
tetradic
#402B9D #9D2B4F #889D2B #2B9D79
square
#402B9D #9D2B4F #889D2B #2B9D79
split-complementary
#402B9D #9D792B #4F9D2B
monochromatic
#19113D #2C1E6D #402B9D #563CCA #7F6CD7

Accessibility & contrast

On white

10.24
#402B9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#402B9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402B9D
10.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402B9D#FFFFFF#000000##FFFFFF
##402B9D1.0010.242.0510.24
#FFFFFF10.241.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0044A0
Deuteranopia (green-blind)
#003D9B
Tritanopia (blue-blind)
#074A61
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402b9d;
/* rgb */ color: rgb(64, 43, 157);
/* oklch */ color: oklch(39.2% 0.174 283.4);
Tailwind
colors: {
  custom: {
    50: '#8067bb',
    500: '#402b9d',
    950: '#000000',
  },
}
SCSS
$custom: #402b9d;
$custom-light: #8067bb;
$custom-dark: #000000;
JSON
{
  "hex": "#402b9d",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 157
  },
  "hsl": {
    "h": 251.053,
    "s": 57,
    "l": 39.216
  },
  "oklch": {
    "l": 0.39244,
    "c": 0.17369,
    "h": 283.4
  },
  "luminance": 0.05252
}

Semantic roles & 50–950 ramp

primary
#402B9D
secondary
#ADBD66
accent
#E048C4
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402B9D

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

Preview Lab → · Contrast checker → · Palette generator →

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