#402CB7#402CB7

#402CB7 is a dark, highly saturated blue. Relative luminance 0.063; OKLCH L 42.0% C 0.204 H 279.4°. Best body text is #FFFFFF at 9.28:1 contrast (WCAG AA passes).

Color values

HEX#402CB7
RGBrgb(64, 44, 183)
HSLhsl(249, 61%, 45%)
HSVhsv(249, 76%, 72%)
CMYKcmyk(65%, 76%, 0%, 28.2%)
CIE-LABlab(30.18, 48.67, -69.79)
CIE-LCHlch(30.18, 85.09, 304.89°)
OKLaboklab(41.95% 0.0335 -0.2015)
OKLCHoklch(41.95% 0.204 279.4)
XYZxyz(11.5595, 6.3093, 45.3992)
Luminance0.0631 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CB7 #A3B72C
analogous
#2C5EB7 #402CB7 #862CB7
triadic
#402CB7 #B7402C #2CB740
tetradic
#402CB7 #B72C5E #A3B72C #2CB786
square
#402CB7 #B72C5E #A3B72C #2CB786
split-complementary
#402CB7 #B7862C #5EB72C
monochromatic
#1D1454 #2F2086 #402CB7 #604CD4 #8C7EE0

Accessibility & contrast

On white

9.28
#402CB7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.26
#402CB7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CB7
9.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CB7#FFFFFF#000000##FFFFFF
##402CB71.009.282.269.28
#FFFFFF9.281.0021.001.00
#0000002.2621.001.0021.00
##FFFFFF9.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CBB
Deuteranopia (green-blind)
#0042B5
Tritanopia (blue-blind)
#005470
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402cb7;
/* rgb */ color: rgb(64, 44, 183);
/* oklch */ color: oklch(42.0% 0.204 279.4);
Tailwind
colors: {
  custom: {
    50: '#8568ce',
    500: '#402cb7',
    950: '#000000',
  },
}
SCSS
$custom: #402cb7;
$custom-light: #8568ce;
$custom-dark: #000000;
JSON
{
  "hex": "#402cb7",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 183
  },
  "hsl": {
    "h": 248.633,
    "s": 61.233,
    "l": 44.51
  },
  "oklch": {
    "l": 0.41951,
    "c": 0.20427,
    "h": 279.4
  },
  "luminance": 0.0631
}

Semantic roles & 50–950 ramp

primary
#402CB7
secondary
#BDC876
accent
#E443CD
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0614
muted
#7D7A82

Preview Lab

Preview with #402CB7

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

Preview Lab → · Contrast checker → · Palette generator →

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