#402FA9#402FA9

#402FA9 is a dark, vivid blue. Relative luminance 0.060; OKLCH L 41.0% C 0.184 H 280.8°. Best body text is #FFFFFF at 9.56:1 contrast (WCAG AA passes).

Color values

HEX#402FA9
RGBrgb(64, 47, 169)
HSLhsl(248, 56%, 42%)
HSVhsv(248, 72%, 66%)
CMYKcmyk(62.1%, 72.2%, 0%, 33.7%)
CIE-LABlab(29.38, 42.70, -62.75)
CIE-LCHlch(29.38, 75.90, 304.24°)
OKLaboklab(40.97% 0.0346 -0.1809)
OKLCHoklch(40.97% 0.184 280.8)
XYZxyz(10.2900, 5.9868, 38.1418)
Luminance0.0599 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FA9 #98A92F
analogous
#2F5BA9 #402FA9 #7D2FA9
triadic
#402FA9 #A9402F #2FA940
tetradic
#402FA9 #A92F5B #98A92F #2FA97D
square
#402FA9 #A92F5B #98A92F #2FA97D
split-complementary
#402FA9 #A97D2F #5BA92F
monochromatic
#1C1449 #2E2279 #402FA9 #5B49CC #8679DA

Accessibility & contrast

On white

9.56
#402FA9 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.20
#402FA9 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FA9
9.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FA9#FFFFFF#000000##FFFFFF
##402FA91.009.562.209.56
#FFFFFF9.561.0021.001.00
#0000002.2021.001.0021.00
##FFFFFF9.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AAD
Deuteranopia (green-blind)
#0041A7
Tritanopia (blue-blind)
#005069
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402fa9;
/* rgb */ color: rgb(64, 47, 169);
/* oklch */ color: oklch(41.0% 0.184 280.8);
Tailwind
colors: {
  custom: {
    50: '#826ac4',
    500: '#402fa9',
    950: '#000000',
  },
}
SCSS
$custom: #402fa9;
$custom-light: #826ac4;
$custom-dark: #000000;
JSON
{
  "hex": "#402fa9",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 169
  },
  "hsl": {
    "h": 248.361,
    "s": 56.481,
    "l": 42.353
  },
  "oklch": {
    "l": 0.4097,
    "c": 0.18421,
    "h": 280.8
  },
  "luminance": 0.05988
}

Semantic roles & 50–950 ramp

primary
#402FA9
secondary
#B7C272
accent
#E048CB
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402FA9

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

Preview Lab → · Contrast checker → · Palette generator →

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