#402AD3#402AD3

#402AD3 is a dark, highly saturated blue. Relative luminance 0.074; OKLCH L 44.7% C 0.238 H 276.6°. Best body text is #FFFFFF at 8.43:1 contrast (WCAG AA passes).

Color values

HEX#402AD3
RGBrgb(64, 42, 211)
HSLhsl(248, 67%, 50%)
HSVhsv(248, 80%, 83%)
CMYKcmyk(69.7%, 80.1%, 0%, 17.3%)
CIE-LABlab(32.81, 58.00, -81.87)
CIE-LCHlch(32.81, 100.33, 305.31°)
OKLaboklab(44.66% 0.0272 -0.2366)
OKLCHoklch(44.66% 0.238 276.6)
XYZxyz(14.6964, 7.4477, 62.2784)
Luminance0.0745 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AD3 #BDD32A
analogous
#2A68D3 #402AD3 #952AD3
triadic
#402AD3 #D3402A #2AD340
tetradic
#402AD3 #D32A68 #BDD32A #2AD395
square
#402AD3 #D32A68 #BDD32A #2AD395
split-complementary
#402AD3 #D3952A #68D32A
monochromatic
#21166D #3120A0 #402AD3 #6D5CDE #9A8FE9

Accessibility & contrast

On white

8.43
#402AD3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.49
#402AD3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AD3
8.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AD3#FFFFFF#000000##FFFFFF
##402AD31.008.432.498.43
#FFFFFF8.431.0021.001.00
#0000002.4921.001.0021.00
##FFFFFF8.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054D8
Deuteranopia (green-blind)
#0046D0
Tritanopia (blue-blind)
#005F80
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #402ad3;
/* rgb */ color: rgb(64, 42, 211);
/* oklch */ color: oklch(44.7% 0.238 276.6);
Tailwind
colors: {
  custom: {
    50: '#8a69e2',
    500: '#402ad3',
    950: '#000000',
  },
}
SCSS
$custom: #402ad3;
$custom-light: #8a69e2;
$custom-dark: #000000;
JSON
{
  "hex": "#402ad3",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 211
  },
  "hsl": {
    "h": 247.811,
    "s": 66.798,
    "l": 49.608
  },
  "oklch": {
    "l": 0.44657,
    "c": 0.23818,
    "h": 276.6
  },
  "luminance": 0.07449
}

Semantic roles & 50–950 ramp

primary
#402AD3
secondary
#C9D386
accent
#EA3ED3
background
#F9F6FE
surface
#F2EBFC
border
#CCC6D5
text
#0E0716
muted
#7E7A84

Preview Lab

Preview with #402AD3

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

Preview Lab → · Contrast checker → · Palette generator →

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