#402EB3#402EB3

#402EB3 is a dark, vivid blue. Relative luminance 0.063; OKLCH L 41.8% C 0.198 H 279.7°. Best body text is #FFFFFF at 9.29:1 contrast (WCAG AA passes).

Color values

HEX#402EB3
RGBrgb(64, 46, 179)
HSLhsl(248, 59%, 44%)
HSVhsv(248, 74%, 70%)
CMYKcmyk(64.2%, 74.3%, 0%, 29.8%)
CIE-LABlab(30.15, 46.39, -67.46)
CIE-LCHlch(30.15, 81.87, 304.51°)
OKLaboklab(41.81% 0.0332 -0.1947)
OKLCHoklch(41.81% 0.198 279.7)
XYZxyz(11.2254, 6.2978, 43.2631)
Luminance0.0630 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402EB3 #A1B32E
analogous
#2E5FB3 #402EB3 #832EB3
triadic
#402EB3 #B3402E #2EB340
tetradic
#402EB3 #B32E5F #A1B32E #2EB383
square
#402EB3 #B32E5F #A1B32E #2EB383
split-complementary
#402EB3 #B3832E #5FB32E
monochromatic
#1D1552 #2F2182 #402EB3 #5F4DD1 #8B7EDE

Accessibility & contrast

On white

9.29
#402EB3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402EB3
9.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402EB3#FFFFFF#000000##FFFFFF
##402EB31.009.292.269.29
#FFFFFF9.291.0021.001.00
#0000002.2621.001.0021.00
##FFFFFF9.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB7
Deuteranopia (green-blind)
#0042B1
Tritanopia (blue-blind)
#00546E
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402eb3;
/* rgb */ color: rgb(64, 46, 179);
/* oklch */ color: oklch(41.8% 0.198 279.7);
Tailwind
colors: {
  custom: {
    50: '#8469cb',
    500: '#402eb3',
    950: '#000000',
  },
}
SCSS
$custom: #402eb3;
$custom-light: #8469cb;
$custom-dark: #000000;
JSON
{
  "hex": "#402eb3",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 179
  },
  "hsl": {
    "h": 248.12,
    "s": 59.111,
    "l": 44.118
  },
  "oklch": {
    "l": 0.41811,
    "c": 0.19752,
    "h": 279.7
  },
  "luminance": 0.06299
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402EB3

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

Preview Lab → · Contrast checker → · Palette generator →

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