#402AB8#402AB8

#402AB8 is a dark, highly saturated blue. Relative luminance 0.062; OKLCH L 41.8% C 0.207 H 279.6°. Best body text is #FFFFFF at 9.37:1 contrast (WCAG AA passes).

Color values

HEX#402AB8
RGBrgb(64, 42, 184)
HSLhsl(249, 63%, 44%)
HSVhsv(249, 77%, 72%)
CMYKcmyk(65.2%, 77.2%, 0%, 27.8%)
CIE-LABlab(29.93, 50.00, -70.81)
CIE-LCHlch(29.93, 86.68, 305.23°)
OKLaboklab(41.8% 0.0344 -0.2044)
OKLCHoklch(41.8% 0.207 279.6)
XYZxyz(11.5913, 6.2057, 45.9251)
Luminance0.0621 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AB8 #A2B82A
analogous
#2A5BB8 #402AB8 #872AB8
triadic
#402AB8 #B8402A #2AB840
tetradic
#402AB8 #B82A5B #A2B82A #2AB887
square
#402AB8 #B82A5B #A2B82A #2AB887
split-complementary
#402AB8 #B8872A #5BB82A
monochromatic
#1D1354 #2F1F86 #402AB8 #5F4AD6 #8B7BE1

Accessibility & contrast

On white

9.37
#402AB8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402AB8
9.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AB8#FFFFFF#000000##FFFFFF
##402AB81.009.372.249.37
#FFFFFF9.371.0021.001.00
#0000002.2421.001.0021.00
##FFFFFF9.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CBC
Deuteranopia (green-blind)
#0041B5
Tritanopia (blue-blind)
#005470
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #402ab8;
/* rgb */ color: rgb(64, 42, 184);
/* oklch */ color: oklch(41.8% 0.207 279.6);
Tailwind
colors: {
  custom: {
    50: '#8567cf',
    500: '#402ab8',
    950: '#000000',
  },
}
SCSS
$custom: #402ab8;
$custom-light: #8567cf;
$custom-dark: #000000;
JSON
{
  "hex": "#402ab8",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 184
  },
  "hsl": {
    "h": 249.296,
    "s": 62.832,
    "l": 44.314
  },
  "oklch": {
    "l": 0.41803,
    "c": 0.20731,
    "h": 279.6
  },
  "luminance": 0.06207
}

Semantic roles & 50–950 ramp

primary
#402AB8
secondary
#BCC975
accent
#E642CC
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0614
muted
#7D7A82

Preview Lab

Preview with #402AB8

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

Preview Lab → · Contrast checker → · Palette generator →

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