#402DA4#402DA4

#402DA4 is a dark, vivid blue. Relative luminance 0.056; OKLCH L 40.2% C 0.180 H 281.9°. Best body text is #FFFFFF at 9.86:1 contrast (WCAG AA passes).

Color values

HEX#402DA4
RGBrgb(64, 45, 164)
HSLhsl(250, 57%, 41%)
HSVhsv(250, 73%, 64%)
CMYKcmyk(61%, 72.6%, 0%, 35.7%)
CIE-LABlab(28.50, 42.25, -61.17)
CIE-LCHlch(28.50, 74.34, 304.63°)
OKLaboklab(40.2% 0.0372 -0.1763)
OKLCHoklch(40.2% 0.18 281.9)
XYZxyz(9.7515, 5.6464, 35.6908)
Luminance0.0565 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DA4 #91A42D
analogous
#2D55A4 #402DA4 #7B2DA4
triadic
#402DA4 #A4402D #2DA440
tetradic
#402DA4 #A42D55 #91A42D #2DA47B
square
#402DA4 #A42D55 #91A42D #2DA47B
split-complementary
#402DA4 #A47B2D #55A42D
monochromatic
#1B1344 #2D2074 #402DA4 #5943CB #8373D9

Accessibility & contrast

On white

9.86
#402DA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#402DA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DA4
9.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DA4#FFFFFF#000000##FFFFFF
##402DA41.009.862.139.86
#FFFFFF9.861.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A8
Deuteranopia (green-blind)
#003FA2
Tritanopia (blue-blind)
#004E65
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402da4;
/* rgb */ color: rgb(64, 45, 164);
/* oklch */ color: oklch(40.2% 0.180 281.9);
Tailwind
colors: {
  custom: {
    50: '#8168c0',
    500: '#402da4',
    950: '#000000',
  },
}
SCSS
$custom: #402da4;
$custom-light: #8168c0;
$custom-dark: #000000;
JSON
{
  "hex": "#402da4",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 164
  },
  "hsl": {
    "h": 249.58,
    "s": 56.938,
    "l": 40.98
  },
  "oklch": {
    "l": 0.40202,
    "c": 0.18019,
    "h": 281.9
  },
  "luminance": 0.05647
}

Semantic roles & 50–950 ramp

primary
#402DA4
secondary
#B3C06D
accent
#E048C8
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402DA4

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

Preview Lab → · Contrast checker → · Palette generator →

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