#402EA8#402EA8

#402EA8 is a dark, vivid blue. Relative luminance 0.059; OKLCH L 40.7% C 0.184 H 281.1°. Best body text is #FFFFFF at 9.66:1 contrast (WCAG AA passes).

Color values

HEX#402EA8
RGBrgb(64, 46, 168)
HSLhsl(249, 57%, 42%)
HSVhsv(249, 73%, 66%)
CMYKcmyk(61.9%, 72.6%, 0%, 34.1%)
CIE-LABlab(29.08, 42.95, -62.63)
CIE-LCHlch(29.08, 75.94, 304.44°)
OKLaboklab(40.73% 0.0356 -0.1806)
OKLCHoklch(40.73% 0.184 281.1)
XYZxyz(10.1570, 5.8704, 37.6361)
Luminance0.0587 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EA8 #96A82E
analogous
#2E59A8 #402EA8 #7D2EA8
triadic
#402EA8 #A8402E #2EA840
tetradic
#402EA8 #A82E59 #96A82E #2EA87D
square
#402EA8 #A82E59 #96A82E #2EA87D
split-complementary
#402EA8 #A87D2E #59A82E
monochromatic
#1B1448 #2E2178 #402EA8 #5A47CD #8577DA

Accessibility & contrast

On white

9.66
#402EA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.17
#402EA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EA8
9.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EA8#FFFFFF#000000##FFFFFF
##402EA81.009.662.179.66
#FFFFFF9.661.0021.001.00
#0000002.1721.001.0021.00
##FFFFFF9.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049AC
Deuteranopia (green-blind)
#0040A6
Tritanopia (blue-blind)
#005068
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402ea8;
/* rgb */ color: rgb(64, 46, 168);
/* oklch */ color: oklch(40.7% 0.184 281.1);
Tailwind
colors: {
  custom: {
    50: '#8269c3',
    500: '#402ea8',
    950: '#000000',
  },
}
SCSS
$custom: #402ea8;
$custom-light: #8269c3;
$custom-dark: #000000;
JSON
{
  "hex": "#402ea8",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 168
  },
  "hsl": {
    "h": 248.852,
    "s": 57.009,
    "l": 41.961
  },
  "oklch": {
    "l": 0.4073,
    "c": 0.18406,
    "h": 281.1
  },
  "luminance": 0.05871
}

Semantic roles & 50–950 ramp

primary
#402EA8
secondary
#B6C270
accent
#E048CA
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402EA8

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

Preview Lab → · Contrast checker → · Palette generator →

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