#402FA7#402FA7

#402FA7 is a dark, vivid blue. Relative luminance 0.059; OKLCH L 40.8% C 0.182 H 281.1°. Best body text is #FFFFFF at 9.62:1 contrast (WCAG AA passes).

Color values

HEX#402FA7
RGBrgb(64, 47, 167)
HSLhsl(249, 56%, 42%)
HSVhsv(249, 72%, 65%)
CMYKcmyk(61.7%, 71.9%, 0%, 34.5%)
CIE-LABlab(29.19, 42.07, -61.85)
CIE-LCHlch(29.19, 74.80, 304.22°)
OKLaboklab(40.78% 0.035 -0.1783)
OKLCHoklch(40.78% 0.182 281.1)
XYZxyz(10.1037, 5.9123, 37.1605)
Luminance0.0591 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FA7 #96A72F
analogous
#2F5AA7 #402FA7 #7C2FA7
triadic
#402FA7 #A7402F #2FA740
tetradic
#402FA7 #A72F5A #96A72F #2FA77C
square
#402FA7 #A72F5A #96A72F #2FA77C
split-complementary
#402FA7 #A77C2F #5AA72F
monochromatic
#1B1447 #2E2277 #402FA7 #5A48CB #8578D9

Accessibility & contrast

On white

9.62
#402FA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.18
#402FA7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FA7
9.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FA7#FFFFFF#000000##FFFFFF
##402FA71.009.622.189.62
#FFFFFF9.621.0021.001.00
#0000002.1821.001.0021.00
##FFFFFF9.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049AB
Deuteranopia (green-blind)
#0040A5
Tritanopia (blue-blind)
#005068
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402fa7;
/* rgb */ color: rgb(64, 47, 167);
/* oklch */ color: oklch(40.8% 0.182 281.1);
Tailwind
colors: {
  custom: {
    50: '#8169c2',
    500: '#402fa7',
    950: '#000000',
  },
}
SCSS
$custom: #402fa7;
$custom-light: #8169c2;
$custom-dark: #000000;
JSON
{
  "hex": "#402fa7",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 167
  },
  "hsl": {
    "h": 248.5,
    "s": 56.075,
    "l": 41.961
  },
  "oklch": {
    "l": 0.40778,
    "c": 0.18173,
    "h": 281.1
  },
  "luminance": 0.05913
}

Semantic roles & 50–950 ramp

primary
#402FA7
secondary
#B6C171
accent
#DF48CA
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402FA7

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

Preview Lab → · Contrast checker → · Palette generator →

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