#402B8E#402B8E

#402B8E is a dark, vivid violet. Relative luminance 0.048; OKLCH L 37.8% C 0.155 H 286.1°. Best body text is #FFFFFF at 10.75:1 contrast (WCAG AA passes).

Color values

HEX#402B8E
RGBrgb(64, 43, 142)
HSLhsl(253, 54%, 36%)
HSVhsv(253, 70%, 56%)
CMYKcmyk(54.9%, 69.7%, 0%, 44.3%)
CIE-LABlab(26.07, 36.49, -51.69)
CIE-LCHlch(26.07, 63.28, 305.22°)
OKLaboklab(37.85% 0.043 -0.1485)
OKLCHoklch(37.85% 0.155 286.1)
XYZxyz(7.8593, 4.7703, 26.0926)
Luminance0.0477 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402B8E #798E2B
analogous
#2B488E #402B8E #722B8E
triadic
#402B8E #8E402B #2B8E40
tetradic
#402B8E #8E2B48 #798E2B #2B8E72
square
#402B8E #8E2B48 #798E2B #2B8E72
split-complementary
#402B8E #8E722B #488E2B
monochromatic
#160F30 #2B1D5F #402B8E #5539BD #7A63D0

Accessibility & contrast

On white

10.75
#402B8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402B8E
10.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402B8E#FFFFFF#000000##FFFFFF
##402B8E1.0010.751.9510.75
#FFFFFF10.751.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004091
Deuteranopia (green-blind)
#003B8C
Tritanopia (blue-blind)
#204459
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402b8e;
/* rgb */ color: rgb(64, 43, 142);
/* oklch */ color: oklch(37.8% 0.155 286.1);
Tailwind
colors: {
  custom: {
    50: '#7d66b0',
    500: '#402b8e',
    950: '#000000',
  },
}
SCSS
$custom: #402b8e;
$custom-light: #7d66b0;
$custom-dark: #000000;
JSON
{
  "hex": "#402b8e",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 142
  },
  "hsl": {
    "h": 252.727,
    "s": 53.514,
    "l": 36.275
  },
  "oklch": {
    "l": 0.37846,
    "c": 0.15463,
    "h": 286.1
  },
  "luminance": 0.04771
}

Semantic roles & 50–950 ramp

primary
#402B8E
secondary
#A4B65F
accent
#DD4BBE
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0A0611
muted
#7C7A80

Preview Lab

Preview with #402B8E

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

Preview Lab → · Contrast checker → · Palette generator →

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