#402FA8#402FA8

#402FA8 is a dark, vivid blue. Relative luminance 0.059; OKLCH L 40.9% C 0.183 H 281.0°. Best body text is #FFFFFF at 9.59:1 contrast (WCAG AA passes).

Color values

HEX#402FA8
RGBrgb(64, 47, 168)
HSLhsl(248, 56%, 42%)
HSVhsv(248, 72%, 66%)
CMYKcmyk(61.9%, 72%, 0%, 34.1%)
CIE-LABlab(29.28, 42.39, -62.30)
CIE-LCHlch(29.28, 75.35, 304.23°)
OKLaboklab(40.87% 0.0348 -0.1796)
OKLCHoklch(40.87% 0.183 281)
XYZxyz(10.1965, 5.9494, 37.6492)
Luminance0.0595 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FA8 #97A82F
analogous
#2F5AA8 #402FA8 #7D2FA8
triadic
#402FA8 #A8402F #2FA840
tetradic
#402FA8 #A82F5A #97A82F #2FA87D
square
#402FA8 #A82F5A #97A82F #2FA87D
split-complementary
#402FA8 #A87D2F #5AA82F
monochromatic
#1C1448 #2E2278 #402FA8 #5B48CC #8678D9

Accessibility & contrast

On white

9.59
#402FA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.19
#402FA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FA8
9.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FA8#FFFFFF#000000##FFFFFF
##402FA81.009.592.199.59
#FFFFFF9.591.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049AC
Deuteranopia (green-blind)
#0040A6
Tritanopia (blue-blind)
#005068
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #402fa8;
/* rgb */ color: rgb(64, 47, 168);
/* oklch */ color: oklch(40.9% 0.183 281.0);
Tailwind
colors: {
  custom: {
    50: '#8169c3',
    500: '#402fa8',
    950: '#000000',
  },
}
SCSS
$custom: #402fa8;
$custom-light: #8169c3;
$custom-dark: #000000;
JSON
{
  "hex": "#402fa8",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 168
  },
  "hsl": {
    "h": 248.43,
    "s": 56.279,
    "l": 42.157
  },
  "oklch": {
    "l": 0.40874,
    "c": 0.18298,
    "h": 281
  },
  "luminance": 0.0595
}

Semantic roles & 50–950 ramp

primary
#402FA8
secondary
#B6C171
accent
#E048CA
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402FA8

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

Preview Lab → · Contrast checker → · Palette generator →

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