#402EA7#402EA7

#402EA7 is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.6% C 0.183 H 281.3°. Best body text is #FFFFFF at 9.69:1 contrast (WCAG AA passes).

Color values

HEX#402EA7
RGBrgb(64, 46, 167)
HSLhsl(249, 57%, 42%)
HSVhsv(249, 72%, 65%)
CMYKcmyk(61.7%, 72.5%, 0%, 34.5%)
CIE-LABlab(28.99, 42.63, -62.18)
CIE-LCHlch(28.99, 75.40, 304.43°)
OKLaboklab(40.63% 0.0358 -0.1793)
OKLCHoklch(40.63% 0.183 281.3)
XYZxyz(10.0642, 5.8333, 37.1473)
Luminance0.0583 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EA7 #95A72E
analogous
#2E58A7 #402EA7 #7D2EA7
triadic
#402EA7 #A7402E #2EA740
tetradic
#402EA7 #A72E58 #95A72E #2EA77D
square
#402EA7 #A72E58 #95A72E #2EA77D
split-complementary
#402EA7 #A77D2E #58A72E
monochromatic
#1B1447 #2E2177 #402EA7 #5A46CC #8576D9

Accessibility & contrast

On white

9.69
#402EA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402EA7
9.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EA7#FFFFFF#000000##FFFFFF
##402EA71.009.692.179.69
#FFFFFF9.691.0021.001.00
#0000002.1721.001.0021.00
##FFFFFF9.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AB
Deuteranopia (green-blind)
#0040A5
Tritanopia (blue-blind)
#004F67
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402ea7;
/* rgb */ color: rgb(64, 46, 167);
/* oklch */ color: oklch(40.6% 0.183 281.3);
Tailwind
colors: {
  custom: {
    50: '#8169c2',
    500: '#402ea7',
    950: '#000000',
  },
}
SCSS
$custom: #402ea7;
$custom-light: #8169c2;
$custom-dark: #000000;
JSON
{
  "hex": "#402ea7",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 167
  },
  "hsl": {
    "h": 248.926,
    "s": 56.808,
    "l": 41.765
  },
  "oklch": {
    "l": 0.40634,
    "c": 0.18283,
    "h": 281.3
  },
  "luminance": 0.05834
}

Semantic roles & 50–950 ramp

primary
#402EA7
secondary
#B5C170
accent
#E048C9
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402EA7

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

Preview Lab → · Contrast checker → · Palette generator →

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