#402FB8#402FB8

#402FB8 is a dark, highly saturated blue. Relative luminance 0.066; OKLCH L 42.4% C 0.203 H 278.9°. Best body text is #FFFFFF at 9.06:1 contrast (WCAG AA passes).

Color values

HEX#402FB8
RGBrgb(64, 47, 184)
HSLhsl(247, 59%, 45%)
HSVhsv(247, 74%, 72%)
CMYKcmyk(65.2%, 74.5%, 0%, 27.8%)
CIE-LABlab(30.84, 47.40, -69.30)
CIE-LCHlch(30.84, 83.96, 304.37°)
OKLaboklab(42.45% 0.0315 -0.2001)
OKLCHoklch(42.45% 0.203 278.9)
XYZxyz(11.7798, 6.5828, 45.9879)
Luminance0.0658 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FB8 #A7B82F
analogous
#2F63B8 #402FB8 #842FB8
triadic
#402FB8 #B8402F #2FB840
tetradic
#402FB8 #B82F63 #A7B82F #2FB884
square
#402FB8 #B82F63 #A7B82F #2FB884
split-complementary
#402FB8 #B8842F #63B82F
monochromatic
#1E1657 #2F2387 #402FB8 #6252D3 #8E82DF

Accessibility & contrast

On white

9.06
#402FB8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.32
#402FB8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FB8
9.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FB8#FFFFFF#000000##FFFFFF
##402FB81.009.062.329.06
#FFFFFF9.061.0021.001.00
#0000002.3221.001.0021.00
##FFFFFF9.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EBC
Deuteranopia (green-blind)
#0043B6
Tritanopia (blue-blind)
#005671
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #402fb8;
/* rgb */ color: rgb(64, 47, 184);
/* oklch */ color: oklch(42.4% 0.203 278.9);
Tailwind
colors: {
  custom: {
    50: '#856acf',
    500: '#402fb8',
    950: '#000000',
  },
}
SCSS
$custom: #402fb8;
$custom-light: #856acf;
$custom-dark: #000000;
JSON
{
  "hex": "#402fb8",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 184
  },
  "hsl": {
    "h": 247.445,
    "s": 59.307,
    "l": 45.294
  },
  "oklch": {
    "l": 0.42445,
    "c": 0.20255,
    "h": 278.9
  },
  "luminance": 0.06584
}

Semantic roles & 50–950 ramp

primary
#402FB8
secondary
#BFC87B
accent
#E245CF
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0714
muted
#7D7A82

Preview Lab

Preview with #402FB8

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

Preview Lab → · Contrast checker → · Palette generator →

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