#402EA2#402EA2

#402EA2 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.2% C 0.177 H 282.0°. Best body text is #FFFFFF at 9.86:1 contrast (WCAG AA passes).

Color values

HEX#402EA2
RGBrgb(64, 46, 162)
HSLhsl(249, 56%, 41%)
HSVhsv(249, 72%, 64%)
CMYKcmyk(60.5%, 71.6%, 0%, 36.5%)
CIE-LABlab(28.52, 41.06, -59.94)
CIE-LCHlch(28.52, 72.65, 304.41°)
OKLaboklab(40.16% 0.0368 -0.1727)
OKLCHoklch(40.16% 0.177 282)
XYZxyz(9.6109, 5.6520, 34.7599)
Luminance0.0565 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EA2 #90A22E
analogous
#2E56A2 #402EA2 #7A2EA2
triadic
#402EA2 #A2402E #2EA240
tetradic
#402EA2 #A22E56 #90A22E #2EA27A
square
#402EA2 #A22E56 #90A22E #2EA27A
split-complementary
#402EA2 #A27A2E #56A22E
monochromatic
#1A1343 #2D2072 #402EA2 #5843CA #8373D7

Accessibility & contrast

On white

9.86
#402EA2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#402EA2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EA2
9.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EA2#FFFFFF#000000##FFFFFF
##402EA21.009.862.139.86
#FFFFFF9.861.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A5
Deuteranopia (green-blind)
#003FA0
Tritanopia (blue-blind)
#004D65
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402ea2;
/* rgb */ color: rgb(64, 46, 162);
/* oklch */ color: oklch(40.2% 0.177 282.0);
Tailwind
colors: {
  custom: {
    50: '#8069bf',
    500: '#402ea2',
    950: '#000000',
  },
}
SCSS
$custom: #402ea2;
$custom-light: #8069bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402ea2",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 162
  },
  "hsl": {
    "h": 249.31,
    "s": 55.769,
    "l": 40.784
  },
  "oklch": {
    "l": 0.40155,
    "c": 0.17658,
    "h": 282
  },
  "luminance": 0.05653
}

Semantic roles & 50–950 ramp

primary
#402EA2
secondary
#B2BF6D
accent
#DF49C8
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402EA2

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

Preview Lab → · Contrast checker → · Palette generator →

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