#402F97#402F97

#402F97 is a dark, vivid blue. Relative luminance 0.054; OKLCH L 39.3% C 0.161 H 283.6°. Best body text is #FFFFFF at 10.14:1 contrast (WCAG AA passes).

Color values

HEX#402F97
RGBrgb(64, 47, 151)
HSLhsl(250, 53%, 39%)
HSVhsv(250, 69%, 59%)
CMYKcmyk(57.6%, 68.9%, 0%, 40.8%)
CIE-LABlab(27.73, 36.98, -54.53)
CIE-LCHlch(27.73, 65.89, 304.15°)
OKLaboklab(39.28% 0.0378 -0.1568)
OKLCHoklch(39.28% 0.161 283.6)
XYZxyz(8.7151, 5.3568, 29.8469)
Luminance0.0536 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F97 #86972F
analogous
#2F5297 #402F97 #742F97
triadic
#402F97 #97402F #2F9740
tetradic
#402F97 #972F52 #86972F #2F9774
square
#402F97 #972F52 #86972F #2F9774
split-complementary
#402F97 #97742F #52972F
monochromatic
#18123A #2C2068 #402F97 #5540C3 #7F6ED2

Accessibility & contrast

On white

10.14
#402F97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402F97
10.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F97#FFFFFF#000000##FFFFFF
##402F971.0010.142.0710.14
#FFFFFF10.141.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459A
Deuteranopia (green-blind)
#003E95
Tritanopia (blue-blind)
#144A5F
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402f97;
/* rgb */ color: rgb(64, 47, 151);
/* oklch */ color: oklch(39.3% 0.161 283.6);
Tailwind
colors: {
  custom: {
    50: '#7e69b6',
    500: '#402f97',
    950: '#000000',
  },
}
SCSS
$custom: #402f97;
$custom-light: #7e69b6;
$custom-dark: #000000;
JSON
{
  "hex": "#402f97",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 151
  },
  "hsl": {
    "h": 249.808,
    "s": 52.525,
    "l": 38.824
  },
  "oklch": {
    "l": 0.39283,
    "c": 0.16135,
    "h": 283.6
  },
  "luminance": 0.05357
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402F97

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

Preview Lab → · Contrast checker → · Palette generator →

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