#402FA1#402FA1

#402FA1 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.2% C 0.174 H 282.0°. Best body text is #FFFFFF at 9.82:1 contrast (WCAG AA passes).

Color values

HEX#402FA1
RGBrgb(64, 47, 161)
HSLhsl(249, 55%, 41%)
HSVhsv(249, 71%, 63%)
CMYKcmyk(60.2%, 70.8%, 0%, 36.9%)
CIE-LABlab(28.63, 40.17, -59.14)
CIE-LCHlch(28.63, 71.49, 304.18°)
OKLaboklab(40.21% 0.0362 -0.1704)
OKLCHoklch(40.21% 0.174 282)
XYZxyz(9.5619, 5.6956, 34.3068)
Luminance0.0570 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FA1 #90A12F
analogous
#2F57A1 #402FA1 #792FA1
triadic
#402FA1 #A1402F #2FA140
tetradic
#402FA1 #A12F57 #90A12F #2FA179
square
#402FA1 #A12F57 #90A12F #2FA179
split-complementary
#402FA1 #A1792F #57A12F
monochromatic
#1A1342 #2D2172 #402FA1 #5845C9 #8374D6

Accessibility & contrast

On white

9.82
#402FA1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#402FA1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FA1
9.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FA1#FFFFFF#000000##FFFFFF
##402FA11.009.822.149.82
#FFFFFF9.821.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A4
Deuteranopia (green-blind)
#003F9F
Tritanopia (blue-blind)
#004D64
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402fa1;
/* rgb */ color: rgb(64, 47, 161);
/* oklch */ color: oklch(40.2% 0.174 282.0);
Tailwind
colors: {
  custom: {
    50: '#8069be',
    500: '#402fa1',
    950: '#000000',
  },
}
SCSS
$custom: #402fa1;
$custom-light: #8069be;
$custom-dark: #000000;
JSON
{
  "hex": "#402fa1",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 161
  },
  "hsl": {
    "h": 248.947,
    "s": 54.808,
    "l": 40.784
  },
  "oklch": {
    "l": 0.40208,
    "c": 0.17418,
    "h": 282
  },
  "luminance": 0.05696
}

Semantic roles & 50–950 ramp

primary
#402FA1
secondary
#B2BE6E
accent
#DE4AC8
background
#F8F6FB
surface
#EFEBF7
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402FA1

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

Preview Lab → · Contrast checker → · Palette generator →

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