#402EA1#402EA1

#402EA1 is a dark, vivid blue. Relative luminance 0.056; OKLCH L 40.1% C 0.175 H 282.2°. Best body text is #FFFFFF at 9.89:1 contrast (WCAG AA passes).

Color values

HEX#402EA1
RGBrgb(64, 46, 161)
HSLhsl(249, 56%, 41%)
HSVhsv(249, 71%, 63%)
CMYKcmyk(60.2%, 71.4%, 0%, 36.9%)
CIE-LABlab(28.42, 40.74, -59.48)
CIE-LCHlch(28.42, 72.10, 304.41°)
OKLaboklab(40.06% 0.037 -0.1714)
OKLCHoklch(40.06% 0.175 282.2)
XYZxyz(9.5224, 5.6165, 34.2936)
Luminance0.0562 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EA1 #8FA12E
analogous
#2E55A1 #402EA1 #792EA1
triadic
#402EA1 #A1402E #2EA140
tetradic
#402EA1 #A12E55 #8FA12E #2EA179
square
#402EA1 #A12E55 #8FA12E #2EA179
split-complementary
#402EA1 #A1792E #55A12E
monochromatic
#1A1342 #2D2071 #402EA1 #5843C9 #8273D7

Accessibility & contrast

On white

9.89
#402EA1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.12
#402EA1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EA1
9.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EA1#FFFFFF#000000##FFFFFF
##402EA11.009.892.129.89
#FFFFFF9.891.0021.001.00
#0000002.1221.001.0021.00
##FFFFFF9.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A4
Deuteranopia (green-blind)
#003F9F
Tritanopia (blue-blind)
#004D64
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402ea1;
/* rgb */ color: rgb(64, 46, 161);
/* oklch */ color: oklch(40.1% 0.175 282.2);
Tailwind
colors: {
  custom: {
    50: '#8069be',
    500: '#402ea1',
    950: '#000000',
  },
}
SCSS
$custom: #402ea1;
$custom-light: #8069be;
$custom-dark: #000000;
JSON
{
  "hex": "#402ea1",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 161
  },
  "hsl": {
    "h": 249.391,
    "s": 55.556,
    "l": 40.588
  },
  "oklch": {
    "l": 0.4006,
    "c": 0.17532,
    "h": 282.2
  },
  "luminance": 0.05617
}

Semantic roles & 50–950 ramp

primary
#402EA1
secondary
#B2BE6C
accent
#DF49C7
background
#F8F6FB
surface
#EFEBF7
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402EA1

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

Preview Lab → · Contrast checker → · Palette generator →

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