#402BBB#402BBB

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

Color values

HEX#402BBB
RGBrgb(64, 43, 187)
HSLhsl(249, 63%, 45%)
HSVhsv(249, 77%, 73%)
CMYKcmyk(65.8%, 77%, 0%, 26.7%)
CIE-LABlab(30.41, 50.40, -71.78)
CIE-LCHlch(30.41, 87.71, 305.07°)
OKLaboklab(42.24% 0.0331 -0.2073)
OKLCHoklch(42.24% 0.21 279.1)
XYZxyz(11.9450, 6.4046, 47.6108)
Luminance0.0641 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402BBB #A6BB2B
analogous
#2B5EBB #402BBB #882BBB
triadic
#402BBB #BB402B #2BBB40
tetradic
#402BBB #BB2B5E #A6BB2B #2BBB88
square
#402BBB #BB2B5E #A6BB2B #2BBB88
split-complementary
#402BBB #BB882B #5EBB2B
monochromatic
#1E1457 #2F2089 #402BBB #614DD6 #8D7FE2

Accessibility & contrast

On white

9.21
#402BBB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.28
#402BBB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402BBB
9.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402BBB#FFFFFF#000000##FFFFFF
##402BBB1.009.212.289.21
#FFFFFF9.211.0021.001.00
#0000002.2821.001.0021.00
##FFFFFF9.211.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402bbb;
/* rgb */ color: rgb(64, 43, 187);
/* oklch */ color: oklch(42.2% 0.210 279.1);
Tailwind
colors: {
  custom: {
    50: '#8568d1',
    500: '#402bbb',
    950: '#000000',
  },
}
SCSS
$custom: #402bbb;
$custom-light: #8568d1;
$custom-dark: #000000;
JSON
{
  "hex": "#402bbb",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 187
  },
  "hsl": {
    "h": 248.75,
    "s": 62.609,
    "l": 45.098
  },
  "oklch": {
    "l": 0.42236,
    "c": 0.20991,
    "h": 279.1
  },
  "luminance": 0.06406
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402BBB

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

Preview Lab → · Contrast checker → · Palette generator →

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