#402EB7#402EB7

#402EB7 is a dark, highly saturated blue. Relative luminance 0.065; OKLCH L 42.2% C 0.202 H 279.2°. Best body text is #FFFFFF at 9.16:1 contrast (WCAG AA passes).

Color values

HEX#402EB7
RGBrgb(64, 46, 183)
HSLhsl(248, 60%, 45%)
HSVhsv(248, 75%, 72%)
CMYKcmyk(65%, 74.9%, 0%, 28.2%)
CIE-LABlab(30.55, 47.63, -69.19)
CIE-LCHlch(30.55, 83.99, 304.54°)
OKLaboklab(42.21% 0.0323 -0.1997)
OKLCHoklch(42.21% 0.202 279.2)
XYZxyz(11.6359, 6.4619, 45.4247)
Luminance0.0646 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EB7 #A5B72E
analogous
#2E61B7 #402EB7 #842EB7
triadic
#402EB7 #B7402E #2EB740
tetradic
#402EB7 #B72E61 #A5B72E #2EB784
square
#402EB7 #B72E61 #A5B72E #2EB784
split-complementary
#402EB7 #B7842E #61B72E
monochromatic
#1E1555 #2F2286 #402EB7 #614FD3 #8D80DF

Accessibility & contrast

On white

9.16
#402EB7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.29
#402EB7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EB7
9.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EB7#FFFFFF#000000##FFFFFF
##402EB71.009.162.299.16
#FFFFFF9.161.0021.001.00
#0000002.2921.001.0021.00
##FFFFFF9.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DBB
Deuteranopia (green-blind)
#0042B5
Tritanopia (blue-blind)
#005570
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #402eb7;
/* rgb */ color: rgb(64, 46, 183);
/* oklch */ color: oklch(42.2% 0.202 279.2);
Tailwind
colors: {
  custom: {
    50: '#846ace',
    500: '#402eb7',
    950: '#000000',
  },
}
SCSS
$custom: #402eb7;
$custom-light: #846ace;
$custom-dark: #000000;
JSON
{
  "hex": "#402eb7",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 183
  },
  "hsl": {
    "h": 247.883,
    "s": 59.825,
    "l": 44.902
  },
  "oklch": {
    "l": 0.42211,
    "c": 0.20233,
    "h": 279.2
  },
  "luminance": 0.06463
}

Semantic roles & 50–950 ramp

primary
#402EB7
secondary
#BEC879
accent
#E345CE
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0614
muted
#7D7A82

Preview Lab

Preview with #402EB7

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

Preview Lab → · Contrast checker → · Palette generator →

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