#402DB6#402DB6

#402DB6 is a dark, highly saturated blue. Relative luminance 0.063; OKLCH L 42.0% C 0.202 H 279.4°. Best body text is #FFFFFF at 9.26:1 contrast (WCAG AA passes).

Color values

HEX#402DB6
RGBrgb(64, 45, 182)
HSLhsl(248, 60%, 45%)
HSVhsv(248, 75%, 71%)
CMYKcmyk(64.8%, 75.3%, 0%, 28.6%)
CIE-LABlab(30.26, 47.85, -69.06)
CIE-LCHlch(30.26, 84.02, 304.71°)
OKLaboklab(41.98% 0.0332 -0.1994)
OKLCHoklch(41.98% 0.202 279.4)
XYZxyz(11.4935, 6.3432, 44.8656)
Luminance0.0634 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DB6 #A3B62D
analogous
#2D5FB6 #402DB6 #852DB6
triadic
#402DB6 #B6402D #2DB640
tetradic
#402DB6 #B62D5F #A3B62D #2DB685
square
#402DB6 #B62D5F #A3B62D #2DB685
split-complementary
#402DB6 #B6852D #5FB62D
monochromatic
#1D1554 #2F2185 #402DB6 #604DD3 #8C7EDF

Accessibility & contrast

On white

9.26
#402DB6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.27
#402DB6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DB6
9.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DB6#FFFFFF#000000##FFFFFF
##402DB61.009.262.279.26
#FFFFFF9.261.0021.001.00
#0000002.2721.001.0021.00
##FFFFFF9.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CBA
Deuteranopia (green-blind)
#0042B4
Tritanopia (blue-blind)
#005470
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402db6;
/* rgb */ color: rgb(64, 45, 182);
/* oklch */ color: oklch(42.0% 0.202 279.4);
Tailwind
colors: {
  custom: {
    50: '#8469cd',
    500: '#402db6',
    950: '#000000',
  },
}
SCSS
$custom: #402db6;
$custom-light: #8469cd;
$custom-dark: #000000;
JSON
{
  "hex": "#402db6",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 182
  },
  "hsl": {
    "h": 248.321,
    "s": 60.352,
    "l": 44.51
  },
  "oklch": {
    "l": 0.41979,
    "c": 0.20212,
    "h": 279.4
  },
  "luminance": 0.06344
}

Semantic roles & 50–950 ramp

primary
#402DB6
secondary
#BDC877
accent
#E344CD
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0614
muted
#7D7A82

Preview Lab

Preview with #402DB6

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

Preview Lab → · Contrast checker → · Palette generator →

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