#402E9F#402E9F

#402E9F is a dark, vivid blue. Relative luminance 0.055; OKLCH L 39.9% C 0.173 H 282.5°. Best body text is #FFFFFF at 9.96:1 contrast (WCAG AA passes).

Color values

HEX#402E9F
RGBrgb(64, 46, 159)
HSLhsl(250, 55%, 40%)
HSVhsv(250, 71%, 62%)
CMYKcmyk(59.7%, 71.1%, 0%, 37.6%)
CIE-LABlab(28.24, 40.11, -58.57)
CIE-LCHlch(28.24, 70.99, 304.40°)
OKLaboklab(39.87% 0.0373 -0.1687)
OKLCHoklch(39.87% 0.173 282.5)
XYZxyz(9.3474, 5.5466, 33.3722)
Luminance0.0555 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E9F #8D9F2E
analogous
#2E549F #402E9F #792E9F
triadic
#402E9F #9F402E #2E9F40
tetradic
#402E9F #9F2E54 #8D9F2E #2E9F79
square
#402E9F #9F2E54 #8D9F2E #2E9F79
split-complementary
#402E9F #9F792E #549F2E
monochromatic
#1A1340 #2D2070 #402E9F #5742C8 #8171D6

Accessibility & contrast

On white

9.96
#402E9F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#402E9F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E9F
9.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E9F#FFFFFF#000000##FFFFFF
##402E9F1.009.962.119.96
#FFFFFF9.961.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A2
Deuteranopia (green-blind)
#003F9D
Tritanopia (blue-blind)
#014C63
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402e9f;
/* rgb */ color: rgb(64, 46, 159);
/* oklch */ color: oklch(39.9% 0.173 282.5);
Tailwind
colors: {
  custom: {
    50: '#8068bc',
    500: '#402e9f',
    950: '#000000',
  },
}
SCSS
$custom: #402e9f;
$custom-light: #8068bc;
$custom-dark: #000000;
JSON
{
  "hex": "#402e9f",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 159
  },
  "hsl": {
    "h": 249.558,
    "s": 55.122,
    "l": 40.196
  },
  "oklch": {
    "l": 0.39871,
    "c": 0.17279,
    "h": 282.5
  },
  "luminance": 0.05547
}

Semantic roles & 50–950 ramp

primary
#402E9F
secondary
#B0BE6B
accent
#DE49C7
background
#F8F6FB
surface
#EFEBF7
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402E9F

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

Preview Lab → · Contrast checker → · Palette generator →

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