#402EA6#402EA6

#402EA6 is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.5% C 0.182 H 281.4°. Best body text is #FFFFFF at 9.72:1 contrast (WCAG AA passes).

Color values

HEX#402EA6
RGBrgb(64, 46, 166)
HSLhsl(249, 57%, 42%)
HSVhsv(249, 72%, 65%)
CMYKcmyk(61.4%, 72.3%, 0%, 34.9%)
CIE-LABlab(28.89, 42.32, -61.74)
CIE-LCHlch(28.89, 74.85, 304.43°)
OKLaboklab(40.54% 0.036 -0.178)
OKLCHoklch(40.54% 0.182 281.4)
XYZxyz(9.9721, 5.7964, 36.6623)
Luminance0.0580 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EA6 #94A62E
analogous
#2E58A6 #402EA6 #7C2EA6
triadic
#402EA6 #A6402E #2EA640
tetradic
#402EA6 #A62E58 #94A62E #2EA67C
square
#402EA6 #A62E58 #94A62E #2EA67C
split-complementary
#402EA6 #A67C2E #58A62E
monochromatic
#1B1346 #2E2176 #402EA6 #5A46CC #8476D9

Accessibility & contrast

On white

9.72
#402EA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#402EA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EA6
9.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EA6#FFFFFF#000000##FFFFFF
##402EA61.009.722.169.72
#FFFFFF9.721.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.721.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402ea6;
/* rgb */ color: rgb(64, 46, 166);
/* oklch */ color: oklch(40.5% 0.182 281.4);
Tailwind
colors: {
  custom: {
    50: '#8169c1',
    500: '#402ea6',
    950: '#000000',
  },
}
SCSS
$custom: #402ea6;
$custom-light: #8169c1;
$custom-dark: #000000;
JSON
{
  "hex": "#402ea6",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 166
  },
  "hsl": {
    "h": 249,
    "s": 56.604,
    "l": 41.569
  },
  "oklch": {
    "l": 0.40537,
    "c": 0.18158,
    "h": 281.4
  },
  "luminance": 0.05797
}

Semantic roles & 50–950 ramp

primary
#402EA6
secondary
#B4C16F
accent
#E048C9
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #402EA6

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

Preview Lab → · Contrast checker → · Palette generator →

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