#402FB6#402FB6

#402FB6 is a dark, highly saturated blue. Relative luminance 0.065; OKLCH L 42.2% C 0.200 H 279.2°. Best body text is #FFFFFF at 9.13:1 contrast (WCAG AA passes).

Color values

HEX#402FB6
RGBrgb(64, 47, 182)
HSLhsl(248, 59%, 45%)
HSVhsv(248, 74%, 71%)
CMYKcmyk(64.8%, 74.2%, 0%, 28.6%)
CIE-LABlab(30.64, 46.78, -68.44)
CIE-LCHlch(30.64, 82.90, 304.35°)
OKLaboklab(42.25% 0.0319 -0.1976)
OKLCHoklch(42.25% 0.2 279.2)
XYZxyz(11.5717, 6.4995, 44.8916)
Luminance0.0650 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FB6 #A5B62F
analogous
#2F61B6 #402FB6 #842FB6
triadic
#402FB6 #B6402F #2FB640
tetradic
#402FB6 #B62F61 #A5B62F #2FB684
square
#402FB6 #B62F61 #A5B62F #2FB684
split-complementary
#402FB6 #B6842F #61B62F
monochromatic
#1E1655 #2F2285 #402FB6 #6150D2 #8D81DE

Accessibility & contrast

On white

9.13
#402FB6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.30
#402FB6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FB6
9.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FB6#FFFFFF#000000##FFFFFF
##402FB61.009.132.309.13
#FFFFFF9.131.0021.001.00
#0000002.3021.001.0021.00
##FFFFFF9.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DBA
Deuteranopia (green-blind)
#0043B4
Tritanopia (blue-blind)
#005570
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #402fb6;
/* rgb */ color: rgb(64, 47, 182);
/* oklch */ color: oklch(42.2% 0.200 279.2);
Tailwind
colors: {
  custom: {
    50: '#846acd',
    500: '#402fb6',
    950: '#000000',
  },
}
SCSS
$custom: #402fb6;
$custom-light: #846acd;
$custom-dark: #000000;
JSON
{
  "hex": "#402fb6",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 182
  },
  "hsl": {
    "h": 247.556,
    "s": 58.952,
    "l": 44.902
  },
  "oklch": {
    "l": 0.42245,
    "c": 0.20014,
    "h": 279.2
  },
  "luminance": 0.065
}

Semantic roles & 50–950 ramp

primary
#402FB6
secondary
#BEC779
accent
#E246CE
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0714
muted
#7D7A82

Preview Lab

Preview with #402FB6

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

Preview Lab → · Contrast checker → · Palette generator →

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