#402FA2#402FA2

#402FA2 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.3% C 0.175 H 281.8°. Best body text is #FFFFFF at 9.78:1 contrast (WCAG AA passes).

Color values

HEX#402FA2
RGBrgb(64, 47, 162)
HSLhsl(249, 55%, 41%)
HSVhsv(249, 71%, 64%)
CMYKcmyk(60.5%, 71%, 0%, 36.5%)
CIE-LABlab(28.72, 40.49, -59.60)
CIE-LCHlch(28.72, 72.05, 304.19°)
OKLaboklab(40.3% 0.036 -0.1717)
OKLCHoklch(40.3% 0.175 281.8)
XYZxyz(9.6504, 5.7310, 34.7731)
Luminance0.0573 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FA2 #91A22F
analogous
#2F57A2 #402FA2 #792FA2
triadic
#402FA2 #A2402F #2FA240
tetradic
#402FA2 #A22F57 #91A22F #2FA279
square
#402FA2 #A22F57 #91A22F #2FA279
split-complementary
#402FA2 #A2792F #57A22F
monochromatic
#1B1343 #2D2173 #402FA2 #5945C9 #8375D7

Accessibility & contrast

On white

9.78
#402FA2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402FA2
9.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FA2#FFFFFF#000000##FFFFFF
##402FA21.009.782.159.78
#FFFFFF9.781.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.781.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402fa2;
/* rgb */ color: rgb(64, 47, 162);
/* oklch */ color: oklch(40.3% 0.175 281.8);
Tailwind
colors: {
  custom: {
    50: '#8069bf',
    500: '#402fa2',
    950: '#000000',
  },
}
SCSS
$custom: #402fa2;
$custom-light: #8069bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402fa2",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 162
  },
  "hsl": {
    "h": 248.87,
    "s": 55.024,
    "l": 40.98
  },
  "oklch": {
    "l": 0.40302,
    "c": 0.17545,
    "h": 281.8
  },
  "luminance": 0.05732
}

Semantic roles & 50–950 ramp

primary
#402FA2
secondary
#B3BF6E
accent
#DE49C8
background
#F8F6FB
surface
#EFEBF7
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402FA2

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

Preview Lab → · Contrast checker → · Palette generator →

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