#402B8D#402B8D

#402B8D is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.8% C 0.153 H 286.3°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#402B8D
RGBrgb(64, 43, 141)
HSLhsl(253, 53%, 36%)
HSVhsv(253, 70%, 55%)
CMYKcmyk(54.6%, 69.5%, 0%, 44.7%)
CIE-LABlab(25.98, 36.18, -51.22)
CIE-LCHlch(25.98, 62.71, 305.24°)
OKLaboklab(37.76% 0.0432 -0.1471)
OKLCHoklch(37.76% 0.153 286.3)
XYZxyz(7.7845, 4.7404, 25.6989)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402B8D #788D2B
analogous
#2B478D #402B8D #712B8D
triadic
#402B8D #8D402B #2B8D40
tetradic
#402B8D #8D2B47 #788D2B #2B8D71
square
#402B8D #8D2B47 #788D2B #2B8D71
split-complementary
#402B8D #8D712B #478D2B
monochromatic
#150E2F #2B1D5E #402B8D #5539BC #7A63CF

Accessibility & contrast

On white

10.78
#402B8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#402B8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402B8D
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402B8D#FFFFFF#000000##FFFFFF
##402B8D1.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004090
Deuteranopia (green-blind)
#003B8B
Tritanopia (blue-blind)
#214458
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402b8d;
/* rgb */ color: rgb(64, 43, 141);
/* oklch */ color: oklch(37.8% 0.153 286.3);
Tailwind
colors: {
  custom: {
    50: '#7d66af',
    500: '#402b8d',
    950: '#000000',
  },
}
SCSS
$custom: #402b8d;
$custom-light: #7d66af;
$custom-dark: #000000;
JSON
{
  "hex": "#402b8d",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 141
  },
  "hsl": {
    "h": 252.857,
    "s": 53.261,
    "l": 36.078
  },
  "oklch": {
    "l": 0.37755,
    "c": 0.15333,
    "h": 286.3
  },
  "luminance": 0.04741
}

Semantic roles & 50–950 ramp

primary
#402B8D
secondary
#A3B65E
accent
#DD4BBD
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402B8D

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

Preview Lab → · Contrast checker → · Palette generator →

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