#402EA4#402EA4

#402EA4 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.3% C 0.179 H 281.7°. Best body text is #FFFFFF at 9.79:1 contrast (WCAG AA passes).

Color values

HEX#402EA4
RGBrgb(64, 46, 164)
HSLhsl(249, 56%, 41%)
HSVhsv(249, 72%, 64%)
CMYKcmyk(61%, 72%, 0%, 35.7%)
CIE-LABlab(28.70, 41.69, -60.84)
CIE-LCHlch(28.70, 73.75, 304.42°)
OKLaboklab(40.35% 0.0364 -0.1753)
OKLCHoklch(40.35% 0.179 281.7)
XYZxyz(9.7901, 5.7236, 35.7036)
Luminance0.0572 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EA4 #92A42E
analogous
#2E57A4 #402EA4 #7B2EA4
triadic
#402EA4 #A4402E #2EA440
tetradic
#402EA4 #A42E57 #92A42E #2EA47B
square
#402EA4 #A42E57 #92A42E #2EA47B
split-complementary
#402EA4 #A47B2E #57A42E
monochromatic
#1B1344 #2D2174 #402EA4 #5945CB #8474D8

Accessibility & contrast

On white

9.79
#402EA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#402EA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EA4
9.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EA4#FFFFFF#000000##FFFFFF
##402EA41.009.792.149.79
#FFFFFF9.791.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A8
Deuteranopia (green-blind)
#003FA2
Tritanopia (blue-blind)
#004E66
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402ea4;
/* rgb */ color: rgb(64, 46, 164);
/* oklch */ color: oklch(40.3% 0.179 281.7);
Tailwind
colors: {
  custom: {
    50: '#8169c0',
    500: '#402ea4',
    950: '#000000',
  },
}
SCSS
$custom: #402ea4;
$custom-light: #8169c0;
$custom-dark: #000000;
JSON
{
  "hex": "#402ea4",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 164
  },
  "hsl": {
    "h": 249.153,
    "s": 56.19,
    "l": 41.176
  },
  "oklch": {
    "l": 0.40346,
    "c": 0.17908,
    "h": 281.7
  },
  "luminance": 0.05724
}

Semantic roles & 50–950 ramp

primary
#402EA4
secondary
#B3C06E
accent
#DF48C8
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402EA4

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

Preview Lab → · Contrast checker → · Palette generator →

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