#402DA2#402DA2

#402DA2 is a dark, vivid blue. Relative luminance 0.056; OKLCH L 40.0% C 0.178 H 282.2°. Best body text is #FFFFFF at 9.93:1 contrast (WCAG AA passes).

Color values

HEX#402DA2
RGBrgb(64, 45, 162)
HSLhsl(250, 57%, 41%)
HSVhsv(250, 72%, 64%)
CMYKcmyk(60.5%, 72.2%, 0%, 36.5%)
CIE-LABlab(28.31, 41.62, -60.27)
CIE-LCHlch(28.31, 73.25, 304.63°)
OKLaboklab(40.01% 0.0376 -0.1737)
OKLCHoklch(40.01% 0.178 282.2)
XYZxyz(9.5723, 5.5747, 34.7470)
Luminance0.0558 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DA2 #8FA22D
analogous
#2D54A2 #402DA2 #7B2DA2
triadic
#402DA2 #A2402D #2DA240
tetradic
#402DA2 #A22D54 #8FA22D #2DA27B
square
#402DA2 #A22D54 #8FA22D #2DA27B
split-complementary
#402DA2 #A27B2D #54A22D
monochromatic
#1A1242 #2D2072 #402DA2 #5842CA #8272D8

Accessibility & contrast

On white

9.93
#402DA2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.12
#402DA2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DA2
9.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DA2#FFFFFF#000000##FFFFFF
##402DA21.009.932.129.93
#FFFFFF9.931.0021.001.00
#0000002.1221.001.0021.00
##FFFFFF9.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A5
Deuteranopia (green-blind)
#003FA0
Tritanopia (blue-blind)
#004D64
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402da2;
/* rgb */ color: rgb(64, 45, 162);
/* oklch */ color: oklch(40.0% 0.178 282.2);
Tailwind
colors: {
  custom: {
    50: '#8068bf',
    500: '#402da2',
    950: '#000000',
  },
}
SCSS
$custom: #402da2;
$custom-light: #8068bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402da2",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 162
  },
  "hsl": {
    "h": 249.744,
    "s": 56.522,
    "l": 40.588
  },
  "oklch": {
    "l": 0.4001,
    "c": 0.17769,
    "h": 282.2
  },
  "luminance": 0.05575
}

Semantic roles & 50–950 ramp

primary
#402DA2
secondary
#B2BF6C
accent
#E048C7
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402DA2

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

Preview Lab → · Contrast checker → · Palette generator →

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