#402DA3#402DA3

#402DA3 is a dark, vivid blue. Relative luminance 0.056; OKLCH L 40.1% C 0.179 H 282.0°. Best body text is #FFFFFF at 9.90:1 contrast (WCAG AA passes).

Color values

HEX#402DA3
RGBrgb(64, 45, 163)
HSLhsl(250, 57%, 41%)
HSVhsv(250, 72%, 64%)
CMYKcmyk(60.7%, 72.4%, 0%, 36.1%)
CIE-LABlab(28.41, 41.94, -60.72)
CIE-LCHlch(28.41, 73.80, 304.63°)
OKLaboklab(40.11% 0.0374 -0.175)
OKLCHoklch(40.11% 0.179 282)
XYZxyz(9.6615, 5.6104, 35.2170)
Luminance0.0561 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DA3 #90A32D
analogous
#2D55A3 #402DA3 #7B2DA3
triadic
#402DA3 #A3402D #2DA340
tetradic
#402DA3 #A32D55 #90A32D #2DA37B
square
#402DA3 #A32D55 #90A32D #2DA37B
split-complementary
#402DA3 #A37B2D #55A32D
monochromatic
#1A1343 #2D2073 #402DA3 #5842CB #8372D8

Accessibility & contrast

On white

9.90
#402DA3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402DA3
9.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DA3#FFFFFF#000000##FFFFFF
##402DA31.009.902.129.90
#FFFFFF9.901.0021.001.00
#0000002.1221.001.0021.00
##FFFFFF9.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A6
Deuteranopia (green-blind)
#003FA1
Tritanopia (blue-blind)
#004D65
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402da3;
/* rgb */ color: rgb(64, 45, 163);
/* oklch */ color: oklch(40.1% 0.179 282.0);
Tailwind
colors: {
  custom: {
    50: '#8168bf',
    500: '#402da3',
    950: '#000000',
  },
}
SCSS
$custom: #402da3;
$custom-light: #8168bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402da3",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 163
  },
  "hsl": {
    "h": 249.661,
    "s": 56.731,
    "l": 40.784
  },
  "oklch": {
    "l": 0.40106,
    "c": 0.17894,
    "h": 282
  },
  "luminance": 0.05611
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402DA3

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

Preview Lab → · Contrast checker → · Palette generator →

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