#402CAF#402CAF

#402CAF is a dark, vivid blue. Relative luminance 0.060; OKLCH L 41.1% C 0.195 H 280.5°. Best body text is #FFFFFF at 9.56:1 contrast (WCAG AA passes).

Color values

HEX#402CAF
RGBrgb(64, 44, 175)
HSLhsl(249, 60%, 43%)
HSVhsv(249, 75%, 69%)
CMYKcmyk(63.4%, 74.9%, 0%, 31.4%)
CIE-LABlab(29.38, 46.22, -66.35)
CIE-LCHlch(29.38, 80.86, 304.86°)
OKLaboklab(41.14% 0.0354 -0.1914)
OKLCHoklch(41.14% 0.195 280.5)
XYZxyz(10.7504, 5.9857, 41.1380)
Luminance0.0599 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CAF #9BAF2C
analogous
#2C5AAF #402CAF #812CAF
triadic
#402CAF #AF402C #2CAF40
tetradic
#402CAF #AF2C5A #9BAF2C #2CAF81
square
#402CAF #AF2C5A #9BAF2C #2CAF81
split-complementary
#402CAF #AF812C #5AAF2C
monochromatic
#1C134D #2E207E #402CAF #5C47D1 #8878DD

Accessibility & contrast

On white

9.56
#402CAF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.20
#402CAF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CAF
9.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CAF#FFFFFF#000000##FFFFFF
##402CAF1.009.562.209.56
#FFFFFF9.561.0021.001.00
#0000002.2021.001.0021.00
##FFFFFF9.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AB3
Deuteranopia (green-blind)
#0040AD
Tritanopia (blue-blind)
#00516B
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402caf;
/* rgb */ color: rgb(64, 44, 175);
/* oklch */ color: oklch(41.1% 0.195 280.5);
Tailwind
colors: {
  custom: {
    50: '#8368c8',
    500: '#402caf',
    950: '#000000',
  },
}
SCSS
$custom: #402caf;
$custom-light: #8368c8;
$custom-dark: #000000;
JSON
{
  "hex": "#402caf",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 175
  },
  "hsl": {
    "h": 249.16,
    "s": 59.817,
    "l": 42.941
  },
  "oklch": {
    "l": 0.41144,
    "c": 0.1947,
    "h": 280.5
  },
  "luminance": 0.05986
}

Semantic roles & 50–950 ramp

primary
#402CAF
secondary
#B8C572
accent
#E345CB
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402CAF

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

Preview Lab → · Contrast checker → · Palette generator →

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