#402FA4#402FA4

#402FA4 is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.5% C 0.178 H 281.5°. Best body text is #FFFFFF at 9.72:1 contrast (WCAG AA passes).

Color values

HEX#402FA4
RGBrgb(64, 47, 164)
HSLhsl(249, 55%, 41%)
HSVhsv(249, 71%, 64%)
CMYKcmyk(61%, 71.3%, 0%, 35.7%)
CIE-LABlab(28.91, 41.12, -60.50)
CIE-LCHlch(28.91, 73.15, 304.20°)
OKLaboklab(40.49% 0.0356 -0.1744)
OKLCHoklch(40.49% 0.178 281.5)
XYZxyz(9.8296, 5.8027, 35.7168)
Luminance0.0580 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FA4 #93A42F
analogous
#2F59A4 #402FA4 #7B2FA4
triadic
#402FA4 #A4402F #2FA440
tetradic
#402FA4 #A42F59 #93A42F #2FA47B
square
#402FA4 #A42F59 #93A42F #2FA47B
split-complementary
#402FA4 #A47B2F #59A42F
monochromatic
#1B1445 #2D2174 #402FA4 #5946CA #8476D8

Accessibility & contrast

On white

9.72
#402FA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#402FA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FA4
9.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FA4#FFFFFF#000000##FFFFFF
##402FA41.009.722.169.72
#FFFFFF9.721.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.721.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402fa4;
/* rgb */ color: rgb(64, 47, 164);
/* oklch */ color: oklch(40.5% 0.178 281.5);
Tailwind
colors: {
  custom: {
    50: '#8169c0',
    500: '#402fa4',
    950: '#000000',
  },
}
SCSS
$custom: #402fa4;
$custom-light: #8169c0;
$custom-dark: #000000;
JSON
{
  "hex": "#402fa4",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 164
  },
  "hsl": {
    "h": 248.718,
    "s": 55.45,
    "l": 41.373
  },
  "oklch": {
    "l": 0.40492,
    "c": 0.17797,
    "h": 281.5
  },
  "luminance": 0.05803
}

Semantic roles & 50–950 ramp

primary
#402FA4
secondary
#B4C06F
accent
#DF49C9
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402FA4

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

Preview Lab → · Contrast checker → · Palette generator →

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