#402FB5#402FB5

#402FB5 is a dark, vivid blue. Relative luminance 0.065; OKLCH L 42.1% C 0.199 H 279.3°. Best body text is #FFFFFF at 9.16:1 contrast (WCAG AA passes).

Color values

HEX#402FB5
RGBrgb(64, 47, 181)
HSLhsl(248, 59%, 45%)
HSVhsv(248, 74%, 71%)
CMYKcmyk(64.6%, 74%, 0%, 29%)
CIE-LABlab(30.54, 46.47, -68.01)
CIE-LCHlch(30.54, 82.37, 304.34°)
OKLaboklab(42.15% 0.0321 -0.1963)
OKLCHoklch(42.15% 0.199 279.3)
XYZxyz(11.4687, 6.4583, 44.3493)
Luminance0.0646 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FB5 #A4B52F
analogous
#2F61B5 #402FB5 #832FB5
triadic
#402FB5 #B5402F #2FB540
tetradic
#402FB5 #B52F61 #A4B52F #2FB583
square
#402FB5 #B52F61 #A4B52F #2FB583
split-complementary
#402FB5 #B5832F #61B52F
monochromatic
#1E1654 #2F2284 #402FB5 #6050D1 #8C80DE

Accessibility & contrast

On white

9.16
#402FB5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.29
#402FB5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FB5
9.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FB5#FFFFFF#000000##FFFFFF
##402FB51.009.162.299.16
#FFFFFF9.161.0021.001.00
#0000002.2921.001.0021.00
##FFFFFF9.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DB9
Deuteranopia (green-blind)
#0043B3
Tritanopia (blue-blind)
#00556F
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #402fb5;
/* rgb */ color: rgb(64, 47, 181);
/* oklch */ color: oklch(42.1% 0.199 279.3);
Tailwind
colors: {
  custom: {
    50: '#846acc',
    500: '#402fb5',
    950: '#000000',
  },
}
SCSS
$custom: #402fb5;
$custom-light: #846acc;
$custom-dark: #000000;
JSON
{
  "hex": "#402fb5",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 181
  },
  "hsl": {
    "h": 247.612,
    "s": 58.772,
    "l": 44.706
  },
  "oklch": {
    "l": 0.42145,
    "c": 0.19893,
    "h": 279.3
  },
  "luminance": 0.06459
}

Semantic roles & 50–950 ramp

primary
#402FB5
secondary
#BDC779
accent
#E246CE
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0714
muted
#7D7A82

Preview Lab

Preview with #402FB5

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

Preview Lab → · Contrast checker → · Palette generator →

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