#402EB2#402EB2

#402EB2 is a dark, vivid blue. Relative luminance 0.063; OKLCH L 41.7% C 0.196 H 279.8°. Best body text is #FFFFFF at 9.33:1 contrast (WCAG AA passes).

Color values

HEX#402EB2
RGBrgb(64, 46, 178)
HSLhsl(248, 59%, 44%)
HSVhsv(248, 74%, 70%)
CMYKcmyk(64%, 74.2%, 0%, 30.2%)
CIE-LABlab(30.05, 46.08, -67.03)
CIE-LCHlch(30.05, 81.34, 304.50°)
OKLaboklab(41.71% 0.0334 -0.1934)
OKLCHoklch(41.71% 0.196 279.8)
XYZxyz(11.1247, 6.2575, 42.7324)
Luminance0.0626 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EB2 #A0B22E
analogous
#2E5EB2 #402EB2 #822EB2
triadic
#402EB2 #B2402E #2EB240
tetradic
#402EB2 #B22E5E #A0B22E #2EB282
square
#402EB2 #B22E5E #A0B22E #2EB282
split-complementary
#402EB2 #B2822E #5EB22E
monochromatic
#1D1551 #2F2181 #402EB2 #5E4CD1 #8A7DDD

Accessibility & contrast

On white

9.33
#402EB2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.25
#402EB2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402EB2
9.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EB2#FFFFFF#000000##FFFFFF
##402EB21.009.332.259.33
#FFFFFF9.331.0021.001.00
#0000002.2521.001.0021.00
##FFFFFF9.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB6
Deuteranopia (green-blind)
#0042B0
Tritanopia (blue-blind)
#00536E
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402eb2;
/* rgb */ color: rgb(64, 46, 178);
/* oklch */ color: oklch(41.7% 0.196 279.8);
Tailwind
colors: {
  custom: {
    50: '#8369ca',
    500: '#402eb2',
    950: '#000000',
  },
}
SCSS
$custom: #402eb2;
$custom-light: #8369ca;
$custom-dark: #000000;
JSON
{
  "hex": "#402eb2",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 178
  },
  "hsl": {
    "h": 248.182,
    "s": 58.929,
    "l": 43.922
  },
  "oklch": {
    "l": 0.41711,
    "c": 0.19631,
    "h": 279.8
  },
  "luminance": 0.06258
}

Semantic roles & 50–950 ramp

primary
#402EB2
secondary
#BBC676
accent
#E246CD
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402EB2

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

Preview Lab → · Contrast checker → · Palette generator →

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