#402DA7#402DA7

#402DA7 is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.5% C 0.184 H 281.5°. Best body text is #FFFFFF at 9.76:1 contrast (WCAG AA passes).

Color values

HEX#402DA7
RGBrgb(64, 45, 167)
HSLhsl(249, 58%, 42%)
HSVhsv(249, 73%, 65%)
CMYKcmyk(61.7%, 73.1%, 0%, 34.5%)
CIE-LABlab(28.79, 43.19, -62.51)
CIE-LCHlch(28.79, 75.98, 304.64°)
OKLaboklab(40.49% 0.0365 -0.1802)
OKLCHoklch(40.49% 0.184 281.5)
XYZxyz(10.0256, 5.7561, 37.1344)
Luminance0.0576 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DA7 #94A72D
analogous
#2D57A7 #402DA7 #7D2DA7
triadic
#402DA7 #A7402D #2DA740
tetradic
#402DA7 #A72D57 #94A72D #2DA77D
square
#402DA7 #A72D57 #94A72D #2DA77D
split-complementary
#402DA7 #A77D2D #57A72D
monochromatic
#1B1347 #2E2077 #402DA7 #5A44CD #8475DA

Accessibility & contrast

On white

9.76
#402DA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#402DA7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DA7
9.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DA7#FFFFFF#000000##FFFFFF
##402DA71.009.762.159.76
#FFFFFF9.761.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AB
Deuteranopia (green-blind)
#003FA5
Tritanopia (blue-blind)
#004F67
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402da7;
/* rgb */ color: rgb(64, 45, 167);
/* oklch */ color: oklch(40.5% 0.184 281.5);
Tailwind
colors: {
  custom: {
    50: '#8168c2',
    500: '#402da7',
    950: '#000000',
  },
}
SCSS
$custom: #402da7;
$custom-light: #8168c2;
$custom-dark: #000000;
JSON
{
  "hex": "#402da7",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 167
  },
  "hsl": {
    "h": 249.344,
    "s": 57.547,
    "l": 41.569
  },
  "oklch": {
    "l": 0.40492,
    "c": 0.1839,
    "h": 281.5
  },
  "luminance": 0.05757
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402DA7

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

Preview Lab → · Contrast checker → · Palette generator →

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