#402CBA#402CBA

#402CBA is a dark, highly saturated blue. Relative luminance 0.064; OKLCH L 42.3% C 0.208 H 279.1°. Best body text is #FFFFFF at 9.18:1 contrast (WCAG AA passes).

Color values

HEX#402CBA
RGBrgb(64, 44, 186)
HSLhsl(248, 62%, 45%)
HSVhsv(248, 76%, 73%)
CMYKcmyk(65.6%, 76.3%, 0%, 27.1%)
CIE-LABlab(30.49, 49.59, -71.07)
CIE-LCHlch(30.49, 86.66, 304.91°)
OKLaboklab(42.26% 0.0328 -0.2052)
OKLCHoklch(42.26% 0.208 279.1)
XYZxyz(11.8751, 6.4355, 47.0612)
Luminance0.0644 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CBA #A6BA2C
analogous
#2C5FBA #402CBA #872CBA
triadic
#402CBA #BA402C #2CBA40
tetradic
#402CBA #BA2C5F #A6BA2C #2CBA87
square
#402CBA #BA2C5F #A6BA2C #2CBA87
split-complementary
#402CBA #BA872C #5FBA2C
monochromatic
#1E1557 #2F2089 #402CBA #614ED5 #8D80E1

Accessibility & contrast

On white

9.18
#402CBA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.29
#402CBA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CBA
9.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CBA#FFFFFF#000000##FFFFFF
##402CBA1.009.182.299.18
#FFFFFF9.181.0021.001.00
#0000002.2921.001.0021.00
##FFFFFF9.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DBE
Deuteranopia (green-blind)
#0042B7
Tritanopia (blue-blind)
#005572
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #402cba;
/* rgb */ color: rgb(64, 44, 186);
/* oklch */ color: oklch(42.3% 0.208 279.1);
Tailwind
colors: {
  custom: {
    50: '#8569d0',
    500: '#402cba',
    950: '#000000',
  },
}
SCSS
$custom: #402cba;
$custom-light: #8569d0;
$custom-dark: #000000;
JSON
{
  "hex": "#402cba",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 186
  },
  "hsl": {
    "h": 248.451,
    "s": 61.739,
    "l": 45.098
  },
  "oklch": {
    "l": 0.42257,
    "c": 0.20781,
    "h": 279.1
  },
  "luminance": 0.06437
}

Semantic roles & 50–950 ramp

primary
#402CBA
secondary
#BECA78
accent
#E543CE
background
#F8F6FD
surface
#F0EBFA
border
#CBC6D3
text
#0D0614
muted
#7D7A83

Preview Lab

Preview with #402CBA

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

Preview Lab → · Contrast checker → · Palette generator →

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