#402FB9#402FB9

#402FB9 is a dark, highly saturated blue. Relative luminance 0.066; OKLCH L 42.5% C 0.204 H 278.8°. Best body text is #FFFFFF at 9.03:1 contrast (WCAG AA passes).

Color values

HEX#402FB9
RGBrgb(64, 47, 185)
HSLhsl(247, 59%, 45%)
HSVhsv(247, 75%, 73%)
CMYKcmyk(65.4%, 74.6%, 0%, 27.5%)
CIE-LABlab(30.94, 47.71, -69.73)
CIE-LCHlch(30.94, 84.49, 304.38°)
OKLaboklab(42.55% 0.0312 -0.2013)
OKLCHoklch(42.55% 0.204 278.8)
XYZxyz(11.8850, 6.6248, 46.5419)
Luminance0.0663 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FB9 #A8B92F
analogous
#2F63B9 #402FB9 #852FB9
triadic
#402FB9 #B9402F #2FB940
tetradic
#402FB9 #B92F63 #A8B92F #2FB985
square
#402FB9 #B92F63 #A8B92F #2FB985
split-complementary
#402FB9 #B9852F #63B92F
monochromatic
#1E1657 #2F2388 #402FB9 #6252D3 #8E83DF

Accessibility & contrast

On white

9.03
#402FB9 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.33
#402FB9 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FB9
9.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FB9#FFFFFF#000000##FFFFFF
##402FB91.009.032.339.03
#FFFFFF9.031.0021.001.00
#0000002.3321.001.0021.00
##FFFFFF9.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EBD
Deuteranopia (green-blind)
#0043B7
Tritanopia (blue-blind)
#005672
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #402fb9;
/* rgb */ color: rgb(64, 47, 185);
/* oklch */ color: oklch(42.5% 0.204 278.8);
Tailwind
colors: {
  custom: {
    50: '#856acf',
    500: '#402fb9',
    950: '#000000',
  },
}
SCSS
$custom: #402fb9;
$custom-light: #856acf;
$custom-dark: #000000;
JSON
{
  "hex": "#402fb9",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 185
  },
  "hsl": {
    "h": 247.391,
    "s": 59.483,
    "l": 45.49
  },
  "oklch": {
    "l": 0.42545,
    "c": 0.20375,
    "h": 278.8
  },
  "luminance": 0.06626
}

Semantic roles & 50–950 ramp

primary
#402FB9
secondary
#BFC97B
accent
#E345CF
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0714
muted
#7D7A82

Preview Lab

Preview with #402FB9

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

Preview Lab → · Contrast checker → · Palette generator →

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