#402DB8#402DB8

#402DB8 is a dark, highly saturated blue. Relative luminance 0.064; OKLCH L 42.2% C 0.204 H 279.2°. Best body text is #FFFFFF at 9.19:1 contrast (WCAG AA passes).

Color values

HEX#402DB8
RGBrgb(64, 45, 184)
HSLhsl(248, 61%, 45%)
HSVhsv(248, 76%, 72%)
CMYKcmyk(65.2%, 75.5%, 0%, 27.8%)
CIE-LABlab(30.46, 48.46, -69.92)
CIE-LCHlch(30.46, 85.07, 304.73°)
OKLaboklab(42.18% 0.0327 -0.2019)
OKLCHoklch(42.18% 0.205 279.2)
XYZxyz(11.7017, 6.4265, 45.9619)
Luminance0.0643 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DB8 #A5B82D
analogous
#2D60B8 #402DB8 #852DB8
triadic
#402DB8 #B8402D #2DB840
tetradic
#402DB8 #B82D60 #A5B82D #2DB885
square
#402DB8 #B82D60 #A5B82D #2DB885
split-complementary
#402DB8 #B8852D #60B82D
monochromatic
#1E1556 #2F2187 #402DB8 #614ED4 #8D80E0

Accessibility & contrast

On white

9.19
#402DB8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.29
#402DB8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DB8
9.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DB8#FFFFFF#000000##FFFFFF
##402DB81.009.192.299.19
#FFFFFF9.191.0021.001.00
#0000002.2921.001.0021.00
##FFFFFF9.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DBC
Deuteranopia (green-blind)
#0042B5
Tritanopia (blue-blind)
#005571
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #402db8;
/* rgb */ color: rgb(64, 45, 184);
/* oklch */ color: oklch(42.2% 0.204 279.2);
Tailwind
colors: {
  custom: {
    50: '#8569cf',
    500: '#402db8',
    950: '#000000',
  },
}
SCSS
$custom: #402db8;
$custom-light: #8569cf;
$custom-dark: #000000;
JSON
{
  "hex": "#402db8",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 184
  },
  "hsl": {
    "h": 248.201,
    "s": 60.699,
    "l": 44.902
  },
  "oklch": {
    "l": 0.42181,
    "c": 0.2045,
    "h": 279.2
  },
  "luminance": 0.06427
}

Semantic roles & 50–950 ramp

primary
#402DB8
secondary
#BEC978
accent
#E444CE
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0614
muted
#7D7A82

Preview Lab

Preview with #402DB8

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

Preview Lab → · Contrast checker → · Palette generator →

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