#402EA3#402EA3

#402EA3 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.3% C 0.178 H 281.9°. Best body text is #FFFFFF at 9.82:1 contrast (WCAG AA passes).

Color values

HEX#402EA3
RGBrgb(64, 46, 163)
HSLhsl(249, 56%, 41%)
HSVhsv(249, 72%, 64%)
CMYKcmyk(60.7%, 71.8%, 0%, 36.1%)
CIE-LABlab(28.61, 41.37, -60.39)
CIE-LCHlch(28.61, 73.20, 304.42°)
OKLaboklab(40.25% 0.0366 -0.174)
OKLCHoklch(40.25% 0.178 281.9)
XYZxyz(9.7001, 5.6877, 35.2299)
Luminance0.0569 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EA3 #91A32E
analogous
#2E56A3 #402EA3 #7A2EA3
triadic
#402EA3 #A3402E #2EA340
tetradic
#402EA3 #A32E56 #91A32E #2EA37A
square
#402EA3 #A32E56 #91A32E #2EA37A
split-complementary
#402EA3 #A37A2E #56A32E
monochromatic
#1B1344 #2D2173 #402EA3 #5944CA #8374D8

Accessibility & contrast

On white

9.82
#402EA3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#402EA3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EA3
9.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EA3#FFFFFF#000000##FFFFFF
##402EA31.009.822.149.82
#FFFFFF9.821.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A6
Deuteranopia (green-blind)
#003FA1
Tritanopia (blue-blind)
#004E65
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402ea3;
/* rgb */ color: rgb(64, 46, 163);
/* oklch */ color: oklch(40.3% 0.178 281.9);
Tailwind
colors: {
  custom: {
    50: '#8169bf',
    500: '#402ea3',
    950: '#000000',
  },
}
SCSS
$custom: #402ea3;
$custom-light: #8169bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402ea3",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 163
  },
  "hsl": {
    "h": 249.231,
    "s": 55.981,
    "l": 40.98
  },
  "oklch": {
    "l": 0.4025,
    "c": 0.17783,
    "h": 281.9
  },
  "luminance": 0.05688
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402EA3

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

Preview Lab → · Contrast checker → · Palette generator →

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