#402FB1#402FB1

#402FB1 is a dark, vivid blue. Relative luminance 0.063; OKLCH L 41.8% C 0.194 H 279.8°. Best body text is #FFFFFF at 9.29:1 contrast (WCAG AA passes).

Color values

HEX#402FB1
RGBrgb(64, 47, 177)
HSLhsl(248, 58%, 44%)
HSVhsv(248, 73%, 69%)
CMYKcmyk(63.8%, 73.4%, 0%, 30.6%)
CIE-LABlab(30.15, 45.22, -66.27)
CIE-LCHlch(30.15, 80.23, 304.31°)
OKLaboklab(41.75% 0.033 -0.1912)
OKLCHoklch(41.75% 0.194 279.8)
XYZxyz(11.0642, 6.2965, 42.2187)
Luminance0.0630 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FB1 #A0B12F
analogous
#2F5FB1 #402FB1 #812FB1
triadic
#402FB1 #B1402F #2FB140
tetradic
#402FB1 #B12F5F #A0B12F #2FB181
square
#402FB1 #B12F5F #A0B12F #2FB181
split-complementary
#402FB1 #B1812F #5FB12F
monochromatic
#1D1550 #2F2281 #402FB1 #5E4DD0 #8A7EDD

Accessibility & contrast

On white

9.29
#402FB1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.26
#402FB1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FB1
9.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FB1#FFFFFF#000000##FFFFFF
##402FB11.009.292.269.29
#FFFFFF9.291.0021.001.00
#0000002.2621.001.0021.00
##FFFFFF9.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB5
Deuteranopia (green-blind)
#0042AF
Tritanopia (blue-blind)
#00536D
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402fb1;
/* rgb */ color: rgb(64, 47, 177);
/* oklch */ color: oklch(41.8% 0.194 279.8);
Tailwind
colors: {
  custom: {
    50: '#836ac9',
    500: '#402fb1',
    950: '#000000',
  },
}
SCSS
$custom: #402fb1;
$custom-light: #836ac9;
$custom-dark: #000000;
JSON
{
  "hex": "#402fb1",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 177
  },
  "hsl": {
    "h": 247.846,
    "s": 58.036,
    "l": 43.922
  },
  "oklch": {
    "l": 0.4175,
    "c": 0.19407,
    "h": 279.8
  },
  "luminance": 0.06297
}

Semantic roles & 50–950 ramp

primary
#402FB1
secondary
#BBC576
accent
#E147CD
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402FB1

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

Preview Lab → · Contrast checker → · Palette generator →

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