#402CD1#402CD1

#402CD1 is a dark, highly saturated blue. Relative luminance 0.075; OKLCH L 44.7% C 0.234 H 276.6°. Best body text is #FFFFFF at 8.40:1 contrast (WCAG AA passes).

Color values

HEX#402CD1
RGBrgb(64, 44, 209)
HSLhsl(247, 65%, 50%)
HSVhsv(247, 79%, 82%)
CMYKcmyk(69.4%, 78.9%, 0%, 18%)
CIE-LABlab(32.91, 56.49, -80.55)
CIE-LCHlch(32.91, 98.38, 305.04°)
OKLaboklab(44.66% 0.0269 -0.2328)
OKLCHoklch(44.66% 0.234 276.6)
XYZxyz(14.5199, 7.4935, 60.9904)
Luminance0.0750 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CD1 #BDD12C
analogous
#2C6AD1 #402CD1 #932CD1
triadic
#402CD1 #D1402C #2CD140
tetradic
#402CD1 #D12C6A #BDD12C #2CD193
square
#402CD1 #D12C6A #BDD12C #2CD193
split-complementary
#402CD1 #D1932C #6AD12C
monochromatic
#21176C #31219E #402CD1 #6D5DDD #9A90E8

Accessibility & contrast

On white

8.40
#402CD1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.50
#402CD1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CD1
8.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CD1#FFFFFF#000000##FFFFFF
##402CD11.008.402.508.40
#FFFFFF8.401.0021.001.00
#0000002.5021.001.0021.00
##FFFFFF8.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054D6
Deuteranopia (green-blind)
#0046CE
Tritanopia (blue-blind)
#005F7F
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #402cd1;
/* rgb */ color: rgb(64, 44, 209);
/* oklch */ color: oklch(44.7% 0.234 276.6);
Tailwind
colors: {
  custom: {
    50: '#8a6ae1',
    500: '#402cd1',
    950: '#000000',
  },
}
SCSS
$custom: #402cd1;
$custom-light: #8a6ae1;
$custom-dark: #000000;
JSON
{
  "hex": "#402cd1",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 209
  },
  "hsl": {
    "h": 247.273,
    "s": 65.217,
    "l": 49.608
  },
  "oklch": {
    "l": 0.44663,
    "c": 0.23435,
    "h": 276.6
  },
  "luminance": 0.07495
}

Semantic roles & 50–950 ramp

primary
#402CD1
secondary
#C9D287
accent
#E840D4
background
#F9F6FE
surface
#F2EBFC
border
#CCC6D5
text
#0E0715
muted
#7E7A84

Preview Lab

Preview with #402CD1

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

Preview Lab → · Contrast checker → · Palette generator →

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