#402AB2#402AB2

#402AB2 is a dark, highly saturated blue. Relative luminance 0.060; OKLCH L 41.2% C 0.200 H 280.3°. Best body text is #FFFFFF at 9.58:1 contrast (WCAG AA passes).

Color values

HEX#402AB2
RGBrgb(64, 42, 178)
HSLhsl(250, 62%, 43%)
HSVhsv(250, 76%, 70%)
CMYKcmyk(64%, 76.4%, 0%, 30.2%)
CIE-LABlab(29.31, 48.18, -68.25)
CIE-LCHlch(29.31, 83.55, 305.22°)
OKLaboklab(41.19% 0.036 -0.197)
OKLCHoklch(41.19% 0.2 280.3)
XYZxyz(10.9756, 5.9594, 42.6827)
Luminance0.0596 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AB2 #9CB22A
analogous
#2A58B2 #402AB2 #842AB2
triadic
#402AB2 #B2402A #2AB240
tetradic
#402AB2 #B22A58 #9CB22A #2AB284
square
#402AB2 #B22A58 #9CB22A #2AB284
split-complementary
#402AB2 #B2842A #58B22A
monochromatic
#1C134F #2E1E80 #402AB2 #5D46D3 #8877DF

Accessibility & contrast

On white

9.58
#402AB2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.19
#402AB2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AB2
9.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AB2#FFFFFF#000000##FFFFFF
##402AB21.009.582.199.58
#FFFFFF9.581.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AB6
Deuteranopia (green-blind)
#0040B0
Tritanopia (blue-blind)
#00516D
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402ab2;
/* rgb */ color: rgb(64, 42, 178);
/* oklch */ color: oklch(41.2% 0.200 280.3);
Tailwind
colors: {
  custom: {
    50: '#8467ca',
    500: '#402ab2',
    950: '#000000',
  },
}
SCSS
$custom: #402ab2;
$custom-light: #8467ca;
$custom-dark: #000000;
JSON
{
  "hex": "#402ab2",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 178
  },
  "hsl": {
    "h": 249.706,
    "s": 61.818,
    "l": 43.137
  },
  "oklch": {
    "l": 0.41188,
    "c": 0.20024,
    "h": 280.3
  },
  "luminance": 0.0596
}

Semantic roles & 50–950 ramp

primary
#402AB2
secondary
#B9C771
accent
#E543CB
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402AB2

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

Preview Lab → · Contrast checker → · Palette generator →

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