#402DA5#402DA5

#402DA5 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.3% C 0.181 H 281.7°. Best body text is #FFFFFF at 9.83:1 contrast (WCAG AA passes).

Color values

HEX#402DA5
RGBrgb(64, 45, 165)
HSLhsl(250, 57%, 41%)
HSVhsv(250, 73%, 65%)
CMYKcmyk(61.2%, 72.7%, 0%, 35.3%)
CIE-LABlab(28.60, 42.56, -61.62)
CIE-LCHlch(28.60, 74.89, 304.63°)
OKLaboklab(40.3% 0.0369 -0.1776)
OKLCHoklch(40.3% 0.181 281.7)
XYZxyz(9.8421, 5.6827, 36.1682)
Luminance0.0568 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DA5 #92A52D
analogous
#2D56A5 #402DA5 #7C2DA5
triadic
#402DA5 #A5402D #2DA540
tetradic
#402DA5 #A52D56 #92A52D #2DA57C
square
#402DA5 #A52D56 #92A52D #2DA57C
split-complementary
#402DA5 #A57C2D #56A52D
monochromatic
#1B1345 #2D2075 #402DA5 #5943CC #8473D9

Accessibility & contrast

On white

9.83
#402DA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402DA5
9.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DA5#FFFFFF#000000##FFFFFF
##402DA51.009.832.149.83
#FFFFFF9.831.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A9
Deuteranopia (green-blind)
#003FA3
Tritanopia (blue-blind)
#004E66
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402da5;
/* rgb */ color: rgb(64, 45, 165);
/* oklch */ color: oklch(40.3% 0.181 281.7);
Tailwind
colors: {
  custom: {
    50: '#8168c1',
    500: '#402da5',
    950: '#000000',
  },
}
SCSS
$custom: #402da5;
$custom-light: #8168c1;
$custom-dark: #000000;
JSON
{
  "hex": "#402da5",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 165
  },
  "hsl": {
    "h": 249.5,
    "s": 57.143,
    "l": 41.176
  },
  "oklch": {
    "l": 0.40298,
    "c": 0.18143,
    "h": 281.7
  },
  "luminance": 0.05683
}

Semantic roles & 50–950 ramp

primary
#402DA5
secondary
#B3C16D
accent
#E047C8
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #402DA5

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

Preview Lab → · Contrast checker → · Palette generator →

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