#402CAA#402CAA

#402CAA is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.6% C 0.189 H 281.2°. Best body text is #FFFFFF at 9.73:1 contrast (WCAG AA passes).

Color values

HEX#402CAA
RGBrgb(64, 44, 170)
HSLhsl(250, 59%, 42%)
HSVhsv(250, 74%, 67%)
CMYKcmyk(62.4%, 74.1%, 0%, 33.3%)
CIE-LABlab(28.88, 44.67, -64.16)
CIE-LCHlch(28.88, 78.18, 304.85°)
OKLaboklab(40.65% 0.0366 -0.1851)
OKLCHoklch(40.65% 0.189 281.2)
XYZxyz(10.2685, 5.7929, 38.5994)
Luminance0.0579 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CAA #96AA2C
analogous
#2C57AA #402CAA #7F2CAA
triadic
#402CAA #AA402C #2CAA40
tetradic
#402CAA #AA2C57 #96AA2C #2CAA7F
square
#402CAA #AA2C57 #96AA2C #2CAA7F
split-complementary
#402CAA #AA7F2C #57AA2C
monochromatic
#1B1349 #2E1F79 #402CAA #5A44CF #8575DB

Accessibility & contrast

On white

9.73
#402CAA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#402CAA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CAA
9.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CAA#FFFFFF#000000##FFFFFF
##402CAA1.009.732.169.73
#FFFFFF9.731.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AE
Deuteranopia (green-blind)
#003FA8
Tritanopia (blue-blind)
#004F68
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402caa;
/* rgb */ color: rgb(64, 44, 170);
/* oklch */ color: oklch(40.6% 0.189 281.2);
Tailwind
colors: {
  custom: {
    50: '#8268c4',
    500: '#402caa',
    950: '#000000',
  },
}
SCSS
$custom: #402caa;
$custom-light: #8268c4;
$custom-dark: #000000;
JSON
{
  "hex": "#402caa",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 170
  },
  "hsl": {
    "h": 249.524,
    "s": 58.879,
    "l": 41.961
  },
  "oklch": {
    "l": 0.40648,
    "c": 0.18864,
    "h": 281.2
  },
  "luminance": 0.05794
}

Semantic roles & 50–950 ramp

primary
#402CAA
secondary
#B6C36F
accent
#E246C9
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402CAA

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

Preview Lab → · Contrast checker → · Palette generator →

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