#402AB5#402AB5

#402AB5 is a dark, highly saturated blue. Relative luminance 0.061; OKLCH L 41.5% C 0.204 H 279.9°. Best body text is #FFFFFF at 9.47:1 contrast (WCAG AA passes).

Color values

HEX#402AB5
RGBrgb(64, 42, 181)
HSLhsl(249, 62%, 44%)
HSVhsv(249, 77%, 71%)
CMYKcmyk(64.6%, 76.8%, 0%, 29%)
CIE-LABlab(29.62, 49.09, -69.53)
CIE-LCHlch(29.62, 85.12, 305.22°)
OKLaboklab(41.5% 0.0352 -0.2007)
OKLCHoklch(41.5% 0.204 279.9)
XYZxyz(11.2802, 6.0812, 44.2865)
Luminance0.0608 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AB5 #9FB52A
analogous
#2A59B5 #402AB5 #852AB5
triadic
#402AB5 #B5402A #2AB540
tetradic
#402AB5 #B52A59 #9FB52A #2AB585
square
#402AB5 #B52A59 #9FB52A #2AB585
split-complementary
#402AB5 #B5852A #59B52A
monochromatic
#1D1352 #2E1E83 #402AB5 #5E48D4 #8A79E0

Accessibility & contrast

On white

9.47
#402AB5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.22
#402AB5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AB5
9.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AB5#FFFFFF#000000##FFFFFF
##402AB51.009.472.229.47
#FFFFFF9.471.0021.001.00
#0000002.2221.001.0021.00
##FFFFFF9.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BB9
Deuteranopia (green-blind)
#0040B3
Tritanopia (blue-blind)
#00536E
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #402ab5;
/* rgb */ color: rgb(64, 42, 181);
/* oklch */ color: oklch(41.5% 0.204 279.9);
Tailwind
colors: {
  custom: {
    50: '#8467cc',
    500: '#402ab5',
    950: '#000000',
  },
}
SCSS
$custom: #402ab5;
$custom-light: #8467cc;
$custom-dark: #000000;
JSON
{
  "hex": "#402ab5",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 181
  },
  "hsl": {
    "h": 249.496,
    "s": 62.332,
    "l": 43.725
  },
  "oklch": {
    "l": 0.41495,
    "c": 0.20378,
    "h": 279.9
  },
  "luminance": 0.06082
}

Semantic roles & 50–950 ramp

primary
#402AB5
secondary
#BBC873
accent
#E542CC
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0614
muted
#7D7A82

Preview Lab

Preview with #402AB5

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

Preview Lab → · Contrast checker → · Palette generator →

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