#402DA6#402DA6

#402DA6 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.4% C 0.183 H 281.6°. Best body text is #FFFFFF at 9.79:1 contrast (WCAG AA passes).

Color values

HEX#402DA6
RGBrgb(64, 45, 166)
HSLhsl(249, 57%, 41%)
HSVhsv(249, 73%, 65%)
CMYKcmyk(61.4%, 72.9%, 0%, 34.9%)
CIE-LABlab(28.69, 42.88, -62.07)
CIE-LCHlch(28.69, 75.44, 304.64°)
OKLaboklab(40.39% 0.0367 -0.1789)
OKLCHoklch(40.39% 0.183 281.6)
XYZxyz(9.9335, 5.7192, 36.6495)
Luminance0.0572 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DA6 #93A62D
analogous
#2D57A6 #402DA6 #7D2DA6
triadic
#402DA6 #A6402D #2DA640
tetradic
#402DA6 #A62D57 #93A62D #2DA67D
square
#402DA6 #A62D57 #93A62D #2DA67D
split-complementary
#402DA6 #A67D2D #57A62D
monochromatic
#1B1346 #2D2076 #402DA6 #5944CC #8474D9

Accessibility & contrast

On white

9.79
#402DA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#402DA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DA6
9.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DA6#FFFFFF#000000##FFFFFF
##402DA61.009.792.149.79
#FFFFFF9.791.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AA
Deuteranopia (green-blind)
#003FA4
Tritanopia (blue-blind)
#004E67
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402da6;
/* rgb */ color: rgb(64, 45, 166);
/* oklch */ color: oklch(40.4% 0.183 281.6);
Tailwind
colors: {
  custom: {
    50: '#8168c2',
    500: '#402da6',
    950: '#000000',
  },
}
SCSS
$custom: #402da6;
$custom-light: #8168c2;
$custom-dark: #000000;
JSON
{
  "hex": "#402da6",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 166
  },
  "hsl": {
    "h": 249.421,
    "s": 57.346,
    "l": 41.373
  },
  "oklch": {
    "l": 0.40395,
    "c": 0.18267,
    "h": 281.6
  },
  "luminance": 0.0572
}

Semantic roles & 50–950 ramp

primary
#402DA6
secondary
#B4C16E
accent
#E147C9
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #402DA6

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

Preview Lab → · Contrast checker → · Palette generator →

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