#402AB7#402AB7

#402AB7 is a dark, highly saturated blue. Relative luminance 0.062; OKLCH L 41.7% C 0.206 H 279.7°. Best body text is #FFFFFF at 9.40:1 contrast (WCAG AA passes).

Color values

HEX#402AB7
RGBrgb(64, 42, 183)
HSLhsl(249, 63%, 44%)
HSVhsv(249, 77%, 72%)
CMYKcmyk(65%, 77%, 0%, 28.2%)
CIE-LABlab(29.82, 49.70, -70.38)
CIE-LCHlch(29.82, 86.16, 305.22°)
OKLaboklab(41.7% 0.0347 -0.2032)
OKLCHoklch(41.7% 0.206 279.7)
XYZxyz(11.4868, 6.1639, 45.3750)
Luminance0.0617 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AB7 #A1B72A
analogous
#2A5AB7 #402AB7 #872AB7
triadic
#402AB7 #B7402A #2AB740
tetradic
#402AB7 #B72A5A #A1B72A #2AB787
square
#402AB7 #B72A5A #A1B72A #2AB787
split-complementary
#402AB7 #B7872A #5AB72A
monochromatic
#1D1353 #2F1F85 #402AB7 #5F49D5 #8B7BE1

Accessibility & contrast

On white

9.40
#402AB7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.23
#402AB7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AB7
9.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AB7#FFFFFF#000000##FFFFFF
##402AB71.009.402.239.40
#FFFFFF9.401.0021.001.00
#0000002.2321.001.0021.00
##FFFFFF9.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BBB
Deuteranopia (green-blind)
#0041B4
Tritanopia (blue-blind)
#00536F
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #402ab7;
/* rgb */ color: rgb(64, 42, 183);
/* oklch */ color: oklch(41.7% 0.206 279.7);
Tailwind
colors: {
  custom: {
    50: '#8567ce',
    500: '#402ab7',
    950: '#000000',
  },
}
SCSS
$custom: #402ab7;
$custom-light: #8567ce;
$custom-dark: #000000;
JSON
{
  "hex": "#402ab7",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 183
  },
  "hsl": {
    "h": 249.362,
    "s": 62.667,
    "l": 44.118
  },
  "oklch": {
    "l": 0.417,
    "c": 0.20614,
    "h": 279.7
  },
  "luminance": 0.06165
}

Semantic roles & 50–950 ramp

primary
#402AB7
secondary
#BCC974
accent
#E642CC
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0614
muted
#7D7A82

Preview Lab

Preview with #402AB7

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

Preview Lab → · Contrast checker → · Palette generator →

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