#402EB4#402EB4

#402EB4 is a dark, vivid blue. Relative luminance 0.063; OKLCH L 41.9% C 0.199 H 279.6°. Best body text is #FFFFFF at 9.26:1 contrast (WCAG AA passes).

Color values

HEX#402EB4
RGBrgb(64, 46, 180)
HSLhsl(248, 59%, 44%)
HSVhsv(248, 74%, 71%)
CMYKcmyk(64.4%, 74.4%, 0%, 29.4%)
CIE-LABlab(30.25, 46.70, -67.89)
CIE-LCHlch(30.25, 82.40, 304.52°)
OKLaboklab(41.91% 0.033 -0.196)
OKLCHoklch(41.91% 0.199 279.6)
XYZxyz(11.3269, 6.3384, 43.7977)
Luminance0.0634 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EB4 #A2B42E
analogous
#2E5FB4 #402EB4 #832EB4
triadic
#402EB4 #B4402E #2EB440
tetradic
#402EB4 #B42E5F #A2B42E #2EB483
square
#402EB4 #B42E5F #A2B42E #2EB483
split-complementary
#402EB4 #B4832E #5FB42E
monochromatic
#1D1553 #2F2283 #402EB4 #5F4ED2 #8B7EDE

Accessibility & contrast

On white

9.26
#402EB4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.27
#402EB4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EB4
9.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EB4#FFFFFF#000000##FFFFFF
##402EB41.009.262.279.26
#FFFFFF9.261.0021.001.00
#0000002.2721.001.0021.00
##FFFFFF9.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB8
Deuteranopia (green-blind)
#0042B2
Tritanopia (blue-blind)
#00546F
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402eb4;
/* rgb */ color: rgb(64, 46, 180);
/* oklch */ color: oklch(41.9% 0.199 279.6);
Tailwind
colors: {
  custom: {
    50: '#8469cc',
    500: '#402eb4',
    950: '#000000',
  },
}
SCSS
$custom: #402eb4;
$custom-light: #8469cc;
$custom-dark: #000000;
JSON
{
  "hex": "#402eb4",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 180
  },
  "hsl": {
    "h": 248.06,
    "s": 59.292,
    "l": 44.314
  },
  "oklch": {
    "l": 0.41911,
    "c": 0.19873,
    "h": 279.6
  },
  "luminance": 0.06339
}

Semantic roles & 50–950 ramp

primary
#402EB4
secondary
#BCC777
accent
#E245CD
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402EB4

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

Preview Lab → · Contrast checker → · Palette generator →

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