#402FA5#402FA5

#402FA5 is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.6% C 0.179 H 281.4°. Best body text is #FFFFFF at 9.69:1 contrast (WCAG AA passes).

Color values

HEX#402FA5
RGBrgb(64, 47, 165)
HSLhsl(249, 56%, 42%)
HSVhsv(249, 72%, 65%)
CMYKcmyk(61.2%, 71.5%, 0%, 35.3%)
CIE-LABlab(29.00, 41.44, -60.95)
CIE-LCHlch(29.00, 73.71, 304.21°)
OKLaboklab(40.59% 0.0354 -0.1757)
OKLCHoklch(40.59% 0.179 281.4)
XYZxyz(9.9203, 5.8389, 36.1943)
Luminance0.0584 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FA5 #94A52F
analogous
#2F59A5 #402FA5 #7B2FA5
triadic
#402FA5 #A5402F #2FA540
tetradic
#402FA5 #A52F59 #94A52F #2FA57B
square
#402FA5 #A52F59 #94A52F #2FA57B
split-complementary
#402FA5 #A57B2F #59A52F
monochromatic
#1B1446 #2E2175 #402FA5 #5A47CB #8476D8

Accessibility & contrast

On white

9.69
#402FA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.17
#402FA5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FA5
9.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FA5#FFFFFF#000000##FFFFFF
##402FA51.009.692.179.69
#FFFFFF9.691.0021.001.00
#0000002.1721.001.0021.00
##FFFFFF9.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A9
Deuteranopia (green-blind)
#0040A3
Tritanopia (blue-blind)
#004F66
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402fa5;
/* rgb */ color: rgb(64, 47, 165);
/* oklch */ color: oklch(40.6% 0.179 281.4);
Tailwind
colors: {
  custom: {
    50: '#8169c1',
    500: '#402fa5',
    950: '#000000',
  },
}
SCSS
$custom: #402fa5;
$custom-light: #8169c1;
$custom-dark: #000000;
JSON
{
  "hex": "#402fa5",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 165
  },
  "hsl": {
    "h": 248.644,
    "s": 55.66,
    "l": 41.569
  },
  "oklch": {
    "l": 0.40587,
    "c": 0.17922,
    "h": 281.4
  },
  "luminance": 0.0584
}

Semantic roles & 50–950 ramp

primary
#402FA5
secondary
#B4C070
accent
#DF49C9
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402FA5

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

Preview Lab → · Contrast checker → · Palette generator →

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