#402FA3#402FA3

#402FA3 is a dark, vivid blue. Relative luminance 0.058; OKLCH L 40.4% C 0.177 H 281.7°. Best body text is #FFFFFF at 9.75:1 contrast (WCAG AA passes).

Color values

HEX#402FA3
RGBrgb(64, 47, 163)
HSLhsl(249, 55%, 41%)
HSVhsv(249, 71%, 64%)
CMYKcmyk(60.7%, 71.2%, 0%, 36.1%)
CIE-LABlab(28.82, 40.80, -60.05)
CIE-LCHlch(28.82, 72.60, 304.20°)
OKLaboklab(40.4% 0.0358 -0.173)
OKLCHoklch(40.4% 0.177 281.7)
XYZxyz(9.7397, 5.7667, 35.2431)
Luminance0.0577 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FA3 #92A32F
analogous
#2F58A3 #402FA3 #7A2FA3
triadic
#402FA3 #A3402F #2FA340
tetradic
#402FA3 #A32F58 #92A32F #2FA37A
square
#402FA3 #A32F58 #92A32F #2FA37A
split-complementary
#402FA3 #A37A2F #58A32F
monochromatic
#1B1444 #2D2173 #402FA3 #5946CA #8475D7

Accessibility & contrast

On white

9.75
#402FA3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#402FA3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FA3
9.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FA3#FFFFFF#000000##FFFFFF
##402FA31.009.752.159.75
#FFFFFF9.751.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A6
Deuteranopia (green-blind)
#0040A1
Tritanopia (blue-blind)
#004E65
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402fa3;
/* rgb */ color: rgb(64, 47, 163);
/* oklch */ color: oklch(40.4% 0.177 281.7);
Tailwind
colors: {
  custom: {
    50: '#8169bf',
    500: '#402fa3',
    950: '#000000',
  },
}
SCSS
$custom: #402fa3;
$custom-light: #8169bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402fa3",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 163
  },
  "hsl": {
    "h": 248.793,
    "s": 55.238,
    "l": 41.176
  },
  "oklch": {
    "l": 0.40397,
    "c": 0.17671,
    "h": 281.7
  },
  "luminance": 0.05767
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402FA3

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

Preview Lab → · Contrast checker → · Palette generator →

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