#402EC4#402EC4

#402EC4 is a dark, highly saturated blue. Relative luminance 0.070; OKLCH L 43.5% C 0.218 H 277.7°. Best body text is #FFFFFF at 8.73:1 contrast (WCAG AA passes).

Color values

HEX#402EC4
RGBrgb(64, 46, 196)
HSLhsl(247, 62%, 47%)
HSVhsv(247, 77%, 77%)
CMYKcmyk(67.3%, 76.5%, 0%, 23.1%)
CIE-LABlab(31.87, 51.62, -74.67)
CIE-LCHlch(31.87, 90.78, 304.65°)
OKLaboklab(43.54% 0.0292 -0.2157)
OKLCHoklch(43.54% 0.218 277.7)
XYZxyz(13.0519, 7.0284, 52.8826)
Luminance0.0703 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EC4 #B2C42E
analogous
#2E67C4 #402EC4 #8B2EC4
triadic
#402EC4 #C4402E #2EC440
tetradic
#402EC4 #C42E67 #B2C42E #2EC48B
square
#402EC4 #C42E67 #B2C42E #2EC48B
split-complementary
#402EC4 #C48B2E #67C42E
monochromatic
#201761 #302292 #402EC4 #6758D8 #9489E3

Accessibility & contrast

On white

8.73
#402EC4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.41
#402EC4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EC4
8.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EC4#FFFFFF#000000##FFFFFF
##402EC41.008.732.418.73
#FFFFFF8.731.0021.001.00
#0000002.4121.001.0021.00
##FFFFFF8.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051C8
Deuteranopia (green-blind)
#0045C1
Tritanopia (blue-blind)
#005A78
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #402ec4;
/* rgb */ color: rgb(64, 46, 196);
/* oklch */ color: oklch(43.5% 0.218 277.7);
Tailwind
colors: {
  custom: {
    50: '#876ad7',
    500: '#402ec4',
    950: '#000000',
  },
}
SCSS
$custom: #402ec4;
$custom-light: #876ad7;
$custom-dark: #000000;
JSON
{
  "hex": "#402ec4",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 196
  },
  "hsl": {
    "h": 247.2,
    "s": 61.983,
    "l": 47.451
  },
  "oklch": {
    "l": 0.43536,
    "c": 0.21771,
    "h": 277.7
  },
  "luminance": 0.0703
}

Semantic roles & 50–950 ramp

primary
#402EC4
secondary
#C4CD81
accent
#E543D2
background
#F9F6FD
surface
#F1EBFA
border
#CBC6D3
text
#0D0715
muted
#7E7A83

Preview Lab

Preview with #402EC4

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

Preview Lab → · Contrast checker → · Palette generator →

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