#402FB3#402FB3

#402FB3 is a dark, vivid blue. Relative luminance 0.064; OKLCH L 41.9% C 0.197 H 279.5°. Best body text is #FFFFFF at 9.23:1 contrast (WCAG AA passes).

Color values

HEX#402FB3
RGBrgb(64, 47, 179)
HSLhsl(248, 58%, 44%)
HSVhsv(248, 74%, 70%)
CMYKcmyk(64.2%, 73.7%, 0%, 29.8%)
CIE-LABlab(30.34, 45.85, -67.15)
CIE-LCHlch(30.34, 81.30, 304.32°)
OKLaboklab(41.95% 0.0326 -0.1938)
OKLCHoklch(41.95% 0.197 279.5)
XYZxyz(11.2650, 6.3768, 43.2763)
Luminance0.0638 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FB3 #A2B32F
analogous
#2F60B3 #402FB3 #822FB3
triadic
#402FB3 #B3402F #2FB340
tetradic
#402FB3 #B32F60 #A2B32F #2FB382
square
#402FB3 #B32F60 #A2B32F #2FB382
split-complementary
#402FB3 #B3822F #60B32F
monochromatic
#1D1652 #2F2283 #402FB3 #5F4FD1 #8B7FDD

Accessibility & contrast

On white

9.23
#402FB3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.28
#402FB3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FB3
9.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FB3#FFFFFF#000000##FFFFFF
##402FB31.009.232.289.23
#FFFFFF9.231.0021.001.00
#0000002.2821.001.0021.00
##FFFFFF9.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB7
Deuteranopia (green-blind)
#0042B1
Tritanopia (blue-blind)
#00546E
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402fb3;
/* rgb */ color: rgb(64, 47, 179);
/* oklch */ color: oklch(41.9% 0.197 279.5);
Tailwind
colors: {
  custom: {
    50: '#846acb',
    500: '#402fb3',
    950: '#000000',
  },
}
SCSS
$custom: #402fb3;
$custom-light: #846acb;
$custom-dark: #000000;
JSON
{
  "hex": "#402fb3",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 179
  },
  "hsl": {
    "h": 247.727,
    "s": 58.407,
    "l": 44.314
  },
  "oklch": {
    "l": 0.41947,
    "c": 0.19651,
    "h": 279.5
  },
  "luminance": 0.06378
}

Semantic roles & 50–950 ramp

primary
#402FB3
secondary
#BCC678
accent
#E246CE
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0713
muted
#7D7A82

Preview Lab

Preview with #402FB3

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

Preview Lab → · Contrast checker → · Palette generator →

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