#402FB7#402FB7

#402FB7 is a dark, highly saturated blue. Relative luminance 0.065; OKLCH L 42.3% C 0.201 H 279.1°. Best body text is #FFFFFF at 9.10:1 contrast (WCAG AA passes).

Color values

HEX#402FB7
RGBrgb(64, 47, 183)
HSLhsl(248, 59%, 45%)
HSVhsv(248, 74%, 72%)
CMYKcmyk(65%, 74.3%, 0%, 28.2%)
CIE-LABlab(30.74, 47.09, -68.87)
CIE-LCHlch(30.74, 83.43, 304.36°)
OKLaboklab(42.35% 0.0317 -0.1988)
OKLCHoklch(42.35% 0.201 279.1)
XYZxyz(11.6754, 6.5410, 45.4378)
Luminance0.0654 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FB7 #A6B72F
analogous
#2F62B7 #402FB7 #842FB7
triadic
#402FB7 #B7402F #2FB740
tetradic
#402FB7 #B72F62 #A6B72F #2FB784
square
#402FB7 #B72F62 #A6B72F #2FB784
split-complementary
#402FB7 #B7842F #62B72F
monochromatic
#1E1656 #2F2286 #402FB7 #6151D2 #8D82DF

Accessibility & contrast

On white

9.10
#402FB7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.31
#402FB7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FB7
9.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FB7#FFFFFF#000000##FFFFFF
##402FB71.009.102.319.10
#FFFFFF9.101.0021.001.00
#0000002.3121.001.0021.00
##FFFFFF9.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EBB
Deuteranopia (green-blind)
#0043B5
Tritanopia (blue-blind)
#005671
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #402fb7;
/* rgb */ color: rgb(64, 47, 183);
/* oklch */ color: oklch(42.3% 0.201 279.1);
Tailwind
colors: {
  custom: {
    50: '#846ace',
    500: '#402fb7',
    950: '#000000',
  },
}
SCSS
$custom: #402fb7;
$custom-light: #846ace;
$custom-dark: #000000;
JSON
{
  "hex": "#402fb7",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 183
  },
  "hsl": {
    "h": 247.5,
    "s": 59.13,
    "l": 45.098
  },
  "oklch": {
    "l": 0.42345,
    "c": 0.20135,
    "h": 279.1
  },
  "luminance": 0.06542
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402FB7

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

Preview Lab → · Contrast checker → · Palette generator →

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