#402DC2#402DC2

#402DC2 is a dark, highly saturated blue. Relative luminance 0.069; OKLCH L 43.2% C 0.216 H 278.0°. Best body text is #FFFFFF at 8.85:1 contrast (WCAG AA passes).

Color values

HEX#402DC2
RGBrgb(64, 45, 194)
HSLhsl(248, 62%, 47%)
HSVhsv(248, 77%, 76%)
CMYKcmyk(67%, 76.8%, 0%, 23.9%)
CIE-LABlab(31.49, 51.51, -74.13)
CIE-LCHlch(31.49, 90.27, 304.79°)
OKLaboklab(43.21% 0.0303 -0.2141)
OKLCHoklch(43.21% 0.216 278)
XYZxyz(12.7872, 6.8607, 51.6789)
Luminance0.0686 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DC2 #AFC22D
analogous
#2D65C2 #402DC2 #8B2DC2
triadic
#402DC2 #C2402D #2DC240
tetradic
#402DC2 #C22D65 #AFC22D #2DC28B
square
#402DC2 #C22D65 #AFC22D #2DC28B
split-complementary
#402DC2 #C28B2D #65C22D
monochromatic
#1F165F #302190 #402DC2 #6555D7 #9286E3

Accessibility & contrast

On white

8.85
#402DC2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.37
#402DC2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402DC2
8.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DC2#FFFFFF#000000##FFFFFF
##402DC21.008.852.378.85
#FFFFFF8.851.0021.001.00
#0000002.3721.001.0021.00
##FFFFFF8.851.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402dc2;
/* rgb */ color: rgb(64, 45, 194);
/* oklch */ color: oklch(43.2% 0.216 278.0);
Tailwind
colors: {
  custom: {
    50: '#876ad6',
    500: '#402dc2',
    950: '#000000',
  },
}
SCSS
$custom: #402dc2;
$custom-light: #876ad6;
$custom-dark: #000000;
JSON
{
  "hex": "#402dc2",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 194
  },
  "hsl": {
    "h": 247.651,
    "s": 62.343,
    "l": 46.863
  },
  "oklch": {
    "l": 0.43205,
    "c": 0.21628,
    "h": 278
  },
  "luminance": 0.06862
}

Semantic roles & 50–950 ramp

primary
#402DC2
secondary
#C3CD7E
accent
#E542D1
background
#F9F6FD
surface
#F1EBFA
border
#CBC6D3
text
#0D0714
muted
#7E7A83

Preview Lab

Preview with #402DC2

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

Preview Lab → · Contrast checker → · Palette generator →

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