#402CA8#402CA8

#402CA8 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.5% C 0.186 H 281.5°. Best body text is #FFFFFF at 9.80:1 contrast (WCAG AA passes).

Color values

HEX#402CA8
RGBrgb(64, 44, 168)
HSLhsl(250, 58%, 42%)
HSVhsv(250, 74%, 66%)
CMYKcmyk(61.9%, 73.8%, 0%, 34.1%)
CIE-LABlab(28.69, 44.05, -63.28)
CIE-LCHlch(28.69, 77.10, 304.84°)
OKLaboklab(40.45% 0.037 -0.1825)
OKLCHoklch(40.45% 0.186 281.5)
XYZxyz(10.0807, 5.7178, 37.6106)
Luminance0.0572 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CA8 #94A82C
analogous
#2C56A8 #402CA8 #7E2CA8
triadic
#402CA8 #A8402C #2CA840
tetradic
#402CA8 #A82C56 #94A82C #2CA87E
square
#402CA8 #A82C56 #94A82C #2CA87E
split-complementary
#402CA8 #A87E2C #56A82C
monochromatic
#1B1347 #2E1F78 #402CA8 #5A43CE #8474DB

Accessibility & contrast

On white

9.80
#402CA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#402CA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CA8
9.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CA8#FFFFFF#000000##FFFFFF
##402CA81.009.802.149.80
#FFFFFF9.801.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AC
Deuteranopia (green-blind)
#003FA6
Tritanopia (blue-blind)
#004F67
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402ca8;
/* rgb */ color: rgb(64, 44, 168);
/* oklch */ color: oklch(40.5% 0.186 281.5);
Tailwind
colors: {
  custom: {
    50: '#8268c3',
    500: '#402ca8',
    950: '#000000',
  },
}
SCSS
$custom: #402ca8;
$custom-light: #8268c3;
$custom-dark: #000000;
JSON
{
  "hex": "#402ca8",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 168
  },
  "hsl": {
    "h": 249.677,
    "s": 58.491,
    "l": 41.569
  },
  "oklch": {
    "l": 0.40451,
    "c": 0.1862,
    "h": 281.5
  },
  "luminance": 0.05719
}

Semantic roles & 50–950 ramp

primary
#402CA8
secondary
#B4C26E
accent
#E246C9
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402CA8

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

Preview Lab → · Contrast checker → · Palette generator →

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