#402AB1#402AB1

#402AB1 is a dark, vivid blue. Relative luminance 0.059; OKLCH L 41.1% C 0.199 H 280.5°. Best body text is #FFFFFF at 9.62:1 contrast (WCAG AA passes).

Color values

HEX#402AB1
RGBrgb(64, 42, 177)
HSLhsl(250, 62%, 43%)
HSVhsv(250, 76%, 69%)
CMYKcmyk(63.8%, 76.3%, 0%, 30.6%)
CIE-LABlab(29.21, 47.88, -67.82)
CIE-LCHlch(29.21, 83.02, 305.22°)
OKLaboklab(41.09% 0.0362 -0.1957)
OKLCHoklch(41.09% 0.199 280.5)
XYZxyz(10.8756, 5.9194, 42.1559)
Luminance0.0592 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AB1 #9BB12A
analogous
#2A57B1 #402AB1 #842AB1
triadic
#402AB1 #B1402A #2AB140
tetradic
#402AB1 #B12A57 #9BB12A #2AB184
square
#402AB1 #B12A57 #9BB12A #2AB184
split-complementary
#402AB1 #B1842A #57B12A
monochromatic
#1C134E #2E1E80 #402AB1 #5C45D3 #8877DF

Accessibility & contrast

On white

9.62
#402AB1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.18
#402AB1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AB1
9.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AB1#FFFFFF#000000##FFFFFF
##402AB11.009.622.189.62
#FFFFFF9.621.0021.001.00
#0000002.1821.001.0021.00
##FFFFFF9.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AB5
Deuteranopia (green-blind)
#0040AF
Tritanopia (blue-blind)
#00516C
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402ab1;
/* rgb */ color: rgb(64, 42, 177);
/* oklch */ color: oklch(41.1% 0.199 280.5);
Tailwind
colors: {
  custom: {
    50: '#8467ca',
    500: '#402ab1',
    950: '#000000',
  },
}
SCSS
$custom: #402ab1;
$custom-light: #8467ca;
$custom-dark: #000000;
JSON
{
  "hex": "#402ab1",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 177
  },
  "hsl": {
    "h": 249.778,
    "s": 61.644,
    "l": 42.941
  },
  "oklch": {
    "l": 0.41086,
    "c": 0.19905,
    "h": 280.5
  },
  "luminance": 0.0592
}

Semantic roles & 50–950 ramp

primary
#402AB1
secondary
#B8C670
accent
#E543CA
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402AB1

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

Preview Lab → · Contrast checker → · Palette generator →

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