#402EAB#402EAB

#402EAB is a dark, vivid blue. Relative luminance 0.060; OKLCH L 41.0% C 0.188 H 280.7°. Best body text is #FFFFFF at 9.56:1 contrast (WCAG AA passes).

Color values

HEX#402EAB
RGBrgb(64, 46, 171)
HSLhsl(249, 58%, 43%)
HSVhsv(249, 73%, 67%)
CMYKcmyk(62.6%, 73.1%, 0%, 32.9%)
CIE-LABlab(29.37, 43.89, -63.96)
CIE-LCHlch(29.37, 77.57, 304.46°)
OKLaboklab(41.02% 0.035 -0.1845)
OKLCHoklch(41.02% 0.188 280.7)
XYZxyz(10.4397, 5.9835, 39.1250)
Luminance0.0598 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EAB #99AB2E
analogous
#2E5AAB #402EAB #7F2EAB
triadic
#402EAB #AB402E #2EAB40
tetradic
#402EAB #AB2E5A #99AB2E #2EAB7F
square
#402EAB #AB2E5A #99AB2E #2EAB7F
split-complementary
#402EAB #AB7F2E #5AAB2E
monochromatic
#1C144B #2E217B #402EAB #5C48CE #8779DB

Accessibility & contrast

On white

9.56
#402EAB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.20
#402EAB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EAB
9.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EAB#FFFFFF#000000##FFFFFF
##402EAB1.009.562.209.56
#FFFFFF9.561.0021.001.00
#0000002.2021.001.0021.00
##FFFFFF9.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AAF
Deuteranopia (green-blind)
#0040A9
Tritanopia (blue-blind)
#00516A
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402eab;
/* rgb */ color: rgb(64, 46, 171);
/* oklch */ color: oklch(41.0% 0.188 280.7);
Tailwind
colors: {
  custom: {
    50: '#8269c5',
    500: '#402eab',
    950: '#000000',
  },
}
SCSS
$custom: #402eab;
$custom-light: #8269c5;
$custom-dark: #000000;
JSON
{
  "hex": "#402eab",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 171
  },
  "hsl": {
    "h": 248.64,
    "s": 57.604,
    "l": 42.549
  },
  "oklch": {
    "l": 0.41022,
    "c": 0.18777,
    "h": 280.7
  },
  "luminance": 0.05984
}

Semantic roles & 50–950 ramp

primary
#402EAB
secondary
#B7C372
accent
#E147CB
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402EAB

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

Preview Lab → · Contrast checker → · Palette generator →

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