#402F96#402F96

#402F96 is a dark, vivid blue. Relative luminance 0.053; OKLCH L 39.2% C 0.160 H 283.7°. Best body text is #FFFFFF at 10.17:1 contrast (WCAG AA passes).

Color values

HEX#402F96
RGBrgb(64, 47, 150)
HSLhsl(250, 52%, 39%)
HSVhsv(250, 69%, 59%)
CMYKcmyk(57.3%, 68.7%, 0%, 41.2%)
CIE-LABlab(27.64, 36.66, -54.06)
CIE-LCHlch(27.64, 65.32, 304.15°)
OKLaboklab(39.19% 0.038 -0.1555)
OKLCHoklch(39.19% 0.16 283.7)
XYZxyz(8.6342, 5.3245, 29.4210)
Luminance0.0532 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F96 #85962F
analogous
#2F5196 #402F96 #732F96
triadic
#402F96 #96402F #2F9640
tetradic
#402F96 #962F51 #85962F #2F9673
square
#402F96 #962F51 #85962F #2F9673
split-complementary
#402F96 #96732F #51962F
monochromatic
#181239 #2C2067 #402F96 #553FC3 #7E6ED2

Accessibility & contrast

On white

10.17
#402F96 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#402F96 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F96
10.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F96#FFFFFF#000000##FFFFFF
##402F961.0010.172.0710.17
#FFFFFF10.171.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004499
Deuteranopia (green-blind)
#003E94
Tritanopia (blue-blind)
#15495E
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402f96;
/* rgb */ color: rgb(64, 47, 150);
/* oklch */ color: oklch(39.2% 0.160 283.7);
Tailwind
colors: {
  custom: {
    50: '#7e69b6',
    500: '#402f96',
    950: '#000000',
  },
}
SCSS
$custom: #402f96;
$custom-light: #7e69b6;
$custom-dark: #000000;
JSON
{
  "hex": "#402f96",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 150
  },
  "hsl": {
    "h": 249.903,
    "s": 52.284,
    "l": 38.627
  },
  "oklch": {
    "l": 0.39192,
    "c": 0.16005,
    "h": 283.7
  },
  "luminance": 0.05325
}

Semantic roles & 50–950 ramp

primary
#402F96
secondary
#ACB968
accent
#DC4CC4
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402F96

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

Preview Lab → · Contrast checker → · Palette generator →

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