#402CA5#402CA5

#402CA5 is a dark, vivid blue. Relative luminance 0.056; OKLCH L 40.2% C 0.183 H 281.9°. Best body text is #FFFFFF at 9.90:1 contrast (WCAG AA passes).

Color values

HEX#402CA5
RGBrgb(64, 44, 165)
HSLhsl(250, 58%, 41%)
HSVhsv(250, 73%, 65%)
CMYKcmyk(61.2%, 73.3%, 0%, 35.3%)
CIE-LABlab(28.40, 43.12, -61.95)
CIE-LCHlch(28.40, 75.47, 304.84°)
OKLaboklab(40.16% 0.0377 -0.1786)
OKLCHoklch(40.16% 0.183 281.9)
XYZxyz(9.8044, 5.6073, 36.1557)
Luminance0.0561 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CA5 #91A52C
analogous
#2C54A5 #402CA5 #7C2CA5
triadic
#402CA5 #A5402C #2CA540
tetradic
#402CA5 #A52C54 #91A52C #2CA57C
square
#402CA5 #A52C54 #91A52C #2CA57C
split-complementary
#402CA5 #A57C2C #54A52C
monochromatic
#1B1244 #2D1F75 #402CA5 #5942CD #8372D9

Accessibility & contrast

On white

9.90
#402CA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.12
#402CA5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CA5
9.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CA5#FFFFFF#000000##FFFFFF
##402CA51.009.902.129.90
#FFFFFF9.901.0021.001.00
#0000002.1221.001.0021.00
##FFFFFF9.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A9
Deuteranopia (green-blind)
#003FA3
Tritanopia (blue-blind)
#004D66
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402ca5;
/* rgb */ color: rgb(64, 44, 165);
/* oklch */ color: oklch(40.2% 0.183 281.9);
Tailwind
colors: {
  custom: {
    50: '#8167c1',
    500: '#402ca5',
    950: '#000000',
  },
}
SCSS
$custom: #402ca5;
$custom-light: #8167c1;
$custom-dark: #000000;
JSON
{
  "hex": "#402ca5",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 165
  },
  "hsl": {
    "h": 249.917,
    "s": 57.895,
    "l": 40.98
  },
  "oklch": {
    "l": 0.40158,
    "c": 0.18251,
    "h": 281.9
  },
  "luminance": 0.05608
}

Semantic roles & 50–950 ramp

primary
#402CA5
secondary
#B3C16C
accent
#E147C8
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #402CA5

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

Preview Lab → · Contrast checker → · Palette generator →

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