#402BB2#402BB2

#402BB2 is a dark, vivid blue. Relative luminance 0.060; OKLCH L 41.3% C 0.199 H 280.2°. Best body text is #FFFFFF at 9.52:1 contrast (WCAG AA passes).

Color values

HEX#402BB2
RGBrgb(64, 43, 178)
HSLhsl(249, 61%, 43%)
HSVhsv(249, 76%, 70%)
CMYKcmyk(64%, 75.8%, 0%, 30.2%)
CIE-LABlab(29.49, 47.67, -67.95)
CIE-LCHlch(29.49, 83.00, 305.05°)
OKLaboklab(41.32% 0.0354 -0.1961)
OKLCHoklch(41.32% 0.199 280.2)
XYZxyz(11.0116, 6.0312, 42.6947)
Luminance0.0603 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402BB2 #9DB22B
analogous
#2B5AB2 #402BB2 #832BB2
triadic
#402BB2 #B2402B #2BB240
tetradic
#402BB2 #B22B5A #9DB22B #2BB283
square
#402BB2 #B22B5A #9DB22B #2BB283
split-complementary
#402BB2 #B2832B #5AB22B
monochromatic
#1D134F #2E1F81 #402BB2 #5D48D3 #8979DF

Accessibility & contrast

On white

9.52
#402BB2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.21
#402BB2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402BB2
9.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402BB2#FFFFFF#000000##FFFFFF
##402BB21.009.522.219.52
#FFFFFF9.521.0021.001.00
#0000002.2121.001.0021.00
##FFFFFF9.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AB6
Deuteranopia (green-blind)
#0040B0
Tritanopia (blue-blind)
#00526D
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402bb2;
/* rgb */ color: rgb(64, 43, 178);
/* oklch */ color: oklch(41.3% 0.199 280.2);
Tailwind
colors: {
  custom: {
    50: '#8468ca',
    500: '#402bb2',
    950: '#000000',
  },
}
SCSS
$custom: #402bb2;
$custom-light: #8468ca;
$custom-dark: #000000;
JSON
{
  "hex": "#402bb2",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 178
  },
  "hsl": {
    "h": 249.333,
    "s": 61.086,
    "l": 43.333
  },
  "oklch": {
    "l": 0.41315,
    "c": 0.19928,
    "h": 280.2
  },
  "luminance": 0.06032
}

Semantic roles & 50–950 ramp

primary
#402BB2
secondary
#B9C772
accent
#E444CB
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402BB2

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

Preview Lab → · Contrast checker → · Palette generator →

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