#402DB7#402DB7

#402DB7 is a dark, highly saturated blue. Relative luminance 0.064; OKLCH L 42.1% C 0.203 H 279.3°. Best body text is #FFFFFF at 9.22:1 contrast (WCAG AA passes).

Color values

HEX#402DB7
RGBrgb(64, 45, 183)
HSLhsl(248, 61%, 45%)
HSVhsv(248, 75%, 72%)
CMYKcmyk(65%, 75.4%, 0%, 28.2%)
CIE-LABlab(30.36, 48.15, -69.49)
CIE-LCHlch(30.36, 84.55, 304.72°)
OKLaboklab(42.08% 0.0329 -0.2006)
OKLCHoklch(42.08% 0.203 279.3)
XYZxyz(11.5972, 6.3847, 45.4118)
Luminance0.0639 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DB7 #A4B72D
analogous
#2D5FB7 #402DB7 #852DB7
triadic
#402DB7 #B7402D #2DB740
tetradic
#402DB7 #B72D5F #A4B72D #2DB785
square
#402DB7 #B72D5F #A4B72D #2DB785
split-complementary
#402DB7 #B7852D #5FB72D
monochromatic
#1E1555 #2F2186 #402DB7 #604ED3 #8C7FDF

Accessibility & contrast

On white

9.22
#402DB7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.28
#402DB7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DB7
9.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DB7#FFFFFF#000000##FFFFFF
##402DB71.009.222.289.22
#FFFFFF9.221.0021.001.00
#0000002.2821.001.0021.00
##FFFFFF9.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DBB
Deuteranopia (green-blind)
#0042B5
Tritanopia (blue-blind)
#005570
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402db7;
/* rgb */ color: rgb(64, 45, 183);
/* oklch */ color: oklch(42.1% 0.203 279.3);
Tailwind
colors: {
  custom: {
    50: '#8569ce',
    500: '#402db7',
    950: '#000000',
  },
}
SCSS
$custom: #402db7;
$custom-light: #8569ce;
$custom-dark: #000000;
JSON
{
  "hex": "#402db7",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 183
  },
  "hsl": {
    "h": 248.261,
    "s": 60.526,
    "l": 44.706
  },
  "oklch": {
    "l": 0.4208,
    "c": 0.20331,
    "h": 279.3
  },
  "luminance": 0.06386
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402DB7

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

Preview Lab → · Contrast checker → · Palette generator →

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