#402B8A#402B8A

#402B8A is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.5% C 0.149 H 287.0°. Best body text is #FFFFFF at 10.88:1 contrast (WCAG AA passes).

Color values

HEX#402B8A
RGBrgb(64, 43, 138)
HSLhsl(253, 52%, 35%)
HSVhsv(253, 69%, 54%)
CMYKcmyk(53.6%, 68.8%, 0%, 45.9%)
CIE-LABlab(25.72, 35.24, -49.78)
CIE-LCHlch(25.72, 60.99, 305.30°)
OKLaboklab(37.49% 0.0436 -0.1429)
OKLCHoklch(37.49% 0.149 287)
XYZxyz(7.5643, 4.6523, 24.5392)
Luminance0.0465 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402B8A #758A2B
analogous
#2B458A #402B8A #6F2B8A
triadic
#402B8A #8A402B #2B8A40
tetradic
#402B8A #8A2B45 #758A2B #2B8A6F
square
#402B8A #8A2B45 #758A2B #2B8A6F
split-complementary
#402B8A #8A6F2B #458A2B
monochromatic
#150E2D #2A1C5B #402B8A #563AB9 #7961CE

Accessibility & contrast

On white

10.88
#402B8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#402B8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402B8A
10.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402B8A#FFFFFF#000000##FFFFFF
##402B8A1.0010.881.9310.88
#FFFFFF10.881.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F8D
Deuteranopia (green-blind)
#003A88
Tritanopia (blue-blind)
#234357
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402b8a;
/* rgb */ color: rgb(64, 43, 138);
/* oklch */ color: oklch(37.5% 0.149 287.0);
Tailwind
colors: {
  custom: {
    50: '#7c66ad',
    500: '#402b8a',
    950: '#000000',
  },
}
SCSS
$custom: #402b8a;
$custom-light: #7c66ad;
$custom-dark: #000000;
JSON
{
  "hex": "#402b8a",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 138
  },
  "hsl": {
    "h": 253.263,
    "s": 52.486,
    "l": 35.49
  },
  "oklch": {
    "l": 0.37486,
    "c": 0.14943,
    "h": 287
  },
  "luminance": 0.04653
}

Semantic roles & 50–950 ramp

primary
#402B8A
secondary
#A1B45D
accent
#DC4CBC
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402B8A

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

Preview Lab → · Contrast checker → · Palette generator →

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