#402FA6#402FA6

#402FA6 is a dark, vivid blue. Relative luminance 0.059; OKLCH L 40.7% C 0.180 H 281.3°. Best body text is #FFFFFF at 9.65:1 contrast (WCAG AA passes).

Color values

HEX#402FA6
RGBrgb(64, 47, 166)
HSLhsl(249, 56%, 42%)
HSVhsv(249, 72%, 65%)
CMYKcmyk(61.4%, 71.7%, 0%, 34.9%)
CIE-LABlab(29.10, 41.75, -61.40)
CIE-LCHlch(29.10, 74.26, 304.22°)
OKLaboklab(40.68% 0.0352 -0.177)
OKLCHoklch(40.68% 0.18 281.3)
XYZxyz(10.0116, 5.8755, 36.6755)
Luminance0.0588 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FA6 #95A62F
analogous
#2F5AA6 #402FA6 #7C2FA6
triadic
#402FA6 #A6402F #2FA640
tetradic
#402FA6 #A62F5A #95A62F #2FA67C
square
#402FA6 #A62F5A #95A62F #2FA67C
split-complementary
#402FA6 #A67C2F #5AA62F
monochromatic
#1B1447 #2E2176 #402FA6 #5A47CB #8577D8

Accessibility & contrast

On white

9.65
#402FA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402FA6
9.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FA6#FFFFFF#000000##FFFFFF
##402FA61.009.652.189.65
#FFFFFF9.651.0021.001.00
#0000002.1821.001.0021.00
##FFFFFF9.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049AA
Deuteranopia (green-blind)
#0040A4
Tritanopia (blue-blind)
#004F67
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402fa6;
/* rgb */ color: rgb(64, 47, 166);
/* oklch */ color: oklch(40.7% 0.180 281.3);
Tailwind
colors: {
  custom: {
    50: '#8169c1',
    500: '#402fa6',
    950: '#000000',
  },
}
SCSS
$custom: #402fa6;
$custom-light: #8169c1;
$custom-dark: #000000;
JSON
{
  "hex": "#402fa6",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 166
  },
  "hsl": {
    "h": 248.571,
    "s": 55.869,
    "l": 41.765
  },
  "oklch": {
    "l": 0.40682,
    "c": 0.18048,
    "h": 281.3
  },
  "luminance": 0.05876
}

Semantic roles & 50–950 ramp

primary
#402FA6
secondary
#B5C170
accent
#DF49CA
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402FA6

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

Preview Lab → · Contrast checker → · Palette generator →

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