#402EC2#402EC2

#402EC2 is a dark, highly saturated blue. Relative luminance 0.069; OKLCH L 43.3% C 0.215 H 277.9°. Best body text is #FFFFFF at 8.79:1 contrast (WCAG AA passes).

Color values

HEX#402EC2
RGBrgb(64, 46, 194)
HSLhsl(247, 62%, 47%)
HSVhsv(247, 76%, 76%)
CMYKcmyk(67%, 76.3%, 0%, 23.9%)
CIE-LABlab(31.67, 51.01, -73.84)
CIE-LCHlch(31.67, 89.74, 304.64°)
OKLaboklab(43.33% 0.0297 -0.2133)
OKLCHoklch(43.33% 0.215 277.9)
XYZxyz(12.8258, 6.9379, 51.6917)
Luminance0.0694 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EC2 #B0C22E
analogous
#2E66C2 #402EC2 #8A2EC2
triadic
#402EC2 #C2402E #2EC240
tetradic
#402EC2 #C22E66 #B0C22E #2EC28A
square
#402EC2 #C22E66 #B0C22E #2EC28A
split-complementary
#402EC2 #C28A2E #66C22E
monochromatic
#1F175F #302291 #402EC2 #6656D7 #9388E3

Accessibility & contrast

On white

8.79
#402EC2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.39
#402EC2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EC2
8.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EC2#FFFFFF#000000##FFFFFF
##402EC21.008.792.398.79
#FFFFFF8.791.0021.001.00
#0000002.3921.001.0021.00
##FFFFFF8.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050C6
Deuteranopia (green-blind)
#0044BF
Tritanopia (blue-blind)
#005977
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #402ec2;
/* rgb */ color: rgb(64, 46, 194);
/* oklch */ color: oklch(43.3% 0.215 277.9);
Tailwind
colors: {
  custom: {
    50: '#876ad6',
    500: '#402ec2',
    950: '#000000',
  },
}
SCSS
$custom: #402ec2;
$custom-light: #876ad6;
$custom-dark: #000000;
JSON
{
  "hex": "#402ec2",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 194
  },
  "hsl": {
    "h": 247.297,
    "s": 61.667,
    "l": 47.059
  },
  "oklch": {
    "l": 0.4333,
    "c": 0.21537,
    "h": 277.9
  },
  "luminance": 0.06939
}

Semantic roles & 50–950 ramp

primary
#402EC2
secondary
#C3CC7F
accent
#E543D1
background
#F9F6FD
surface
#F1EBFA
border
#CBC6D3
text
#0D0714
muted
#7E7A83

Preview Lab

Preview with #402EC2

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

Preview Lab → · Contrast checker → · Palette generator →

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