#402EA5#402EA5

#402EA5 is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.4% C 0.180 H 281.6°. Best body text is #FFFFFF at 9.76:1 contrast (WCAG AA passes).

Color values

HEX#402EA5
RGBrgb(64, 46, 165)
HSLhsl(249, 56%, 41%)
HSVhsv(249, 72%, 65%)
CMYKcmyk(61.2%, 72.1%, 0%, 35.3%)
CIE-LABlab(28.80, 42.00, -61.29)
CIE-LCHlch(28.80, 74.30, 304.42°)
OKLaboklab(40.44% 0.0362 -0.1767)
OKLCHoklch(40.44% 0.18 281.6)
XYZxyz(9.8808, 5.7599, 36.1811)
Luminance0.0576 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EA5 #93A52E
analogous
#2E58A5 #402EA5 #7C2EA5
triadic
#402EA5 #A5402E #2EA540
tetradic
#402EA5 #A52E58 #93A52E #2EA57C
square
#402EA5 #A52E58 #93A52E #2EA57C
split-complementary
#402EA5 #A57C2E #58A52E
monochromatic
#1B1345 #2D2175 #402EA5 #5945CB #8475D8

Accessibility & contrast

On white

9.76
#402EA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#402EA5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EA5
9.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EA5#FFFFFF#000000##FFFFFF
##402EA51.009.762.159.76
#FFFFFF9.761.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A9
Deuteranopia (green-blind)
#0040A3
Tritanopia (blue-blind)
#004E66
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402ea5;
/* rgb */ color: rgb(64, 46, 165);
/* oklch */ color: oklch(40.4% 0.180 281.6);
Tailwind
colors: {
  custom: {
    50: '#8169c1',
    500: '#402ea5',
    950: '#000000',
  },
}
SCSS
$custom: #402ea5;
$custom-light: #8169c1;
$custom-dark: #000000;
JSON
{
  "hex": "#402ea5",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 165
  },
  "hsl": {
    "h": 249.076,
    "s": 56.398,
    "l": 41.373
  },
  "oklch": {
    "l": 0.40441,
    "c": 0.18034,
    "h": 281.6
  },
  "luminance": 0.05761
}

Semantic roles & 50–950 ramp

primary
#402EA5
secondary
#B4C06F
accent
#E048C9
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402EA5

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

Preview Lab → · Contrast checker → · Palette generator →

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