#402DA8#402DA8

#402DA8 is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.6% C 0.185 H 281.3°. Best body text is #FFFFFF at 9.73:1 contrast (WCAG AA passes).

Color values

HEX#402DA8
RGBrgb(64, 45, 168)
HSLhsl(249, 58%, 42%)
HSVhsv(249, 73%, 66%)
CMYKcmyk(61.9%, 73.2%, 0%, 34.1%)
CIE-LABlab(28.88, 43.50, -62.96)
CIE-LCHlch(28.88, 76.52, 304.64°)
OKLaboklab(40.59% 0.0363 -0.1815)
OKLCHoklch(40.59% 0.185 281.3)
XYZxyz(10.1184, 5.7932, 37.6232)
Luminance0.0579 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DA8 #95A82D
analogous
#2D58A8 #402DA8 #7E2DA8
triadic
#402DA8 #A8402D #2DA840
tetradic
#402DA8 #A82D58 #95A82D #2DA87E
square
#402DA8 #A82D58 #95A82D #2DA87E
split-complementary
#402DA8 #A87E2D #58A82D
monochromatic
#1B1347 #2E2078 #402DA8 #5A45CD #8575DA

Accessibility & contrast

On white

9.73
#402DA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#402DA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DA8
9.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DA8#FFFFFF#000000##FFFFFF
##402DA81.009.732.169.73
#FFFFFF9.731.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AC
Deuteranopia (green-blind)
#0040A6
Tritanopia (blue-blind)
#004F68
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402da8;
/* rgb */ color: rgb(64, 45, 168);
/* oklch */ color: oklch(40.6% 0.185 281.3);
Tailwind
colors: {
  custom: {
    50: '#8268c3',
    500: '#402da8',
    950: '#000000',
  },
}
SCSS
$custom: #402da8;
$custom-light: #8268c3;
$custom-dark: #000000;
JSON
{
  "hex": "#402da8",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 168
  },
  "hsl": {
    "h": 249.268,
    "s": 57.746,
    "l": 41.765
  },
  "oklch": {
    "l": 0.40589,
    "c": 0.18514,
    "h": 281.3
  },
  "luminance": 0.05794
}

Semantic roles & 50–950 ramp

primary
#402DA8
secondary
#B5C26F
accent
#E147C9
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402DA8

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

Preview Lab → · Contrast checker → · Palette generator →

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