#402F99#402F99

#402F99 is a dark, vivid blue. Relative luminance 0.054; OKLCH L 39.5% C 0.164 H 283.2°. Best body text is #FFFFFF at 10.07:1 contrast (WCAG AA passes).

Color values

HEX#402F99
RGBrgb(64, 47, 153)
HSLhsl(250, 53%, 39%)
HSVhsv(250, 69%, 60%)
CMYKcmyk(58.2%, 69.3%, 0%, 40%)
CIE-LABlab(27.91, 37.62, -55.46)
CIE-LCHlch(27.91, 67.02, 304.15°)
OKLaboklab(39.47% 0.0375 -0.1596)
OKLCHoklch(39.47% 0.164 283.2)
XYZxyz(8.8789, 5.4224, 30.7096)
Luminance0.0542 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F99 #88992F
analogous
#2F5399 #402F99 #752F99
triadic
#402F99 #99402F #2F9940
tetradic
#402F99 #992F53 #88992F #2F9975
square
#402F99 #992F53 #88992F #2F9975
split-complementary
#402F99 #99752F #53992F
monochromatic
#19123B #2C216A #402F99 #5641C5 #7F6FD3

Accessibility & contrast

On white

10.07
#402F99 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#402F99 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F99
10.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F99#FFFFFF#000000##FFFFFF
##402F991.0010.072.0810.07
#FFFFFF10.071.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459C
Deuteranopia (green-blind)
#003E97
Tritanopia (blue-blind)
#104B60
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402f99;
/* rgb */ color: rgb(64, 47, 153);
/* oklch */ color: oklch(39.5% 0.164 283.2);
Tailwind
colors: {
  custom: {
    50: '#7f69b8',
    500: '#402f99',
    950: '#000000',
  },
}
SCSS
$custom: #402f99;
$custom-light: #7f69b8;
$custom-dark: #000000;
JSON
{
  "hex": "#402f99",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 153
  },
  "hsl": {
    "h": 249.623,
    "s": 53,
    "l": 39.216
  },
  "oklch": {
    "l": 0.39465,
    "c": 0.16394,
    "h": 283.2
  },
  "luminance": 0.05423
}

Semantic roles & 50–950 ramp

primary
#402F99
secondary
#ADBA69
accent
#DC4BC5
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402F99

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

Preview Lab → · Contrast checker → · Palette generator →

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