#402CAB#402CAB

#402CAB is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.7% C 0.190 H 281.0°. Best body text is #FFFFFF at 9.69:1 contrast (WCAG AA passes).

Color values

HEX#402CAB
RGBrgb(64, 44, 171)
HSLhsl(249, 59%, 42%)
HSVhsv(249, 74%, 67%)
CMYKcmyk(62.6%, 74.3%, 0%, 32.9%)
CIE-LABlab(28.98, 44.98, -64.60)
CIE-LCHlch(28.98, 78.72, 304.85°)
OKLaboklab(40.75% 0.0364 -0.1863)
OKLCHoklch(40.75% 0.19 281)
XYZxyz(10.3634, 5.8309, 39.0995)
Luminance0.0583 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CAB #97AB2C
analogous
#2C57AB #402CAB #802CAB
triadic
#402CAB #AB402C #2CAB40
tetradic
#402CAB #AB2C57 #97AB2C #2CAB80
square
#402CAB #AB2C57 #97AB2C #2CAB80
split-complementary
#402CAB #AB802C #57AB2C
monochromatic
#1C134A #2E1F7A #402CAB #5B45CF #8676DC

Accessibility & contrast

On white

9.69
#402CAB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.17
#402CAB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CAB
9.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CAB#FFFFFF#000000##FFFFFF
##402CAB1.009.692.179.69
#FFFFFF9.691.0021.001.00
#0000002.1721.001.0021.00
##FFFFFF9.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049AF
Deuteranopia (green-blind)
#0040A9
Tritanopia (blue-blind)
#005069
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402cab;
/* rgb */ color: rgb(64, 44, 171);
/* oklch */ color: oklch(40.7% 0.190 281.0);
Tailwind
colors: {
  custom: {
    50: '#8268c5',
    500: '#402cab',
    950: '#000000',
  },
}
SCSS
$custom: #402cab;
$custom-light: #8268c5;
$custom-dark: #000000;
JSON
{
  "hex": "#402cab",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 171
  },
  "hsl": {
    "h": 249.449,
    "s": 59.07,
    "l": 42.157
  },
  "oklch": {
    "l": 0.40746,
    "c": 0.18985,
    "h": 281
  },
  "luminance": 0.05832
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402CAB

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

Preview Lab → · Contrast checker → · Palette generator →

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