#402DB3#402DB3

#402DB3 is a dark, vivid blue. Relative luminance 0.062; OKLCH L 41.7% C 0.199 H 279.8°. Best body text is #FFFFFF at 9.36:1 contrast (WCAG AA passes).

Color values

HEX#402DB3
RGBrgb(64, 45, 179)
HSLhsl(249, 60%, 44%)
HSVhsv(249, 75%, 70%)
CMYKcmyk(64.2%, 74.9%, 0%, 29.8%)
CIE-LABlab(29.96, 46.92, -67.77)
CIE-LCHlch(29.96, 82.43, 304.70°)
OKLaboklab(41.68% 0.0339 -0.1956)
OKLCHoklch(41.68% 0.199 279.8)
XYZxyz(11.1868, 6.2206, 43.2503)
Luminance0.0622 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DB3 #A0B32D
analogous
#2D5DB3 #402DB3 #832DB3
triadic
#402DB3 #B3402D #2DB340
tetradic
#402DB3 #B32D5D #A0B32D #2DB383
square
#402DB3 #B32D5D #A0B32D #2DB383
split-complementary
#402DB3 #B3832D #5DB32D
monochromatic
#1D1451 #2F2182 #402DB3 #5E4BD2 #8A7CDE

Accessibility & contrast

On white

9.36
#402DB3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.24
#402DB3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DB3
9.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DB3#FFFFFF#000000##FFFFFF
##402DB31.009.362.249.36
#FFFFFF9.361.0021.001.00
#0000002.2421.001.0021.00
##FFFFFF9.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BB7
Deuteranopia (green-blind)
#0041B1
Tritanopia (blue-blind)
#00536E
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402db3;
/* rgb */ color: rgb(64, 45, 179);
/* oklch */ color: oklch(41.7% 0.199 279.8);
Tailwind
colors: {
  custom: {
    50: '#8469cb',
    500: '#402db3',
    950: '#000000',
  },
}
SCSS
$custom: #402db3;
$custom-light: #8469cb;
$custom-dark: #000000;
JSON
{
  "hex": "#402db3",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 179
  },
  "hsl": {
    "h": 248.507,
    "s": 59.821,
    "l": 43.922
  },
  "oklch": {
    "l": 0.41677,
    "c": 0.19852,
    "h": 279.8
  },
  "luminance": 0.06221
}

Semantic roles & 50–950 ramp

primary
#402DB3
secondary
#BBC775
accent
#E345CD
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402DB3

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

Preview Lab → · Contrast checker → · Palette generator →

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