#402CA7#402CA7

#402CA7 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.4% C 0.185 H 281.6°. Best body text is #FFFFFF at 9.83:1 contrast (WCAG AA passes).

Color values

HEX#402CA7
RGBrgb(64, 44, 167)
HSLhsl(250, 58%, 41%)
HSVhsv(250, 74%, 65%)
CMYKcmyk(61.7%, 73.7%, 0%, 34.5%)
CIE-LABlab(28.59, 43.74, -62.84)
CIE-LCHlch(28.59, 76.56, 304.84°)
OKLaboklab(40.35% 0.0373 -0.1812)
OKLCHoklch(40.35% 0.185 281.6)
XYZxyz(9.9879, 5.6807, 37.1219)
Luminance0.0568 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CA7 #93A72C
analogous
#2C56A7 #402CA7 #7E2CA7
triadic
#402CA7 #A7402C #2CA740
tetradic
#402CA7 #A72C56 #93A72C #2CA77E
square
#402CA7 #A72C56 #93A72C #2CA77E
split-complementary
#402CA7 #A77E2C #56A72C
monochromatic
#1B1246 #2D1F77 #402CA7 #5943CD #8473DA

Accessibility & contrast

On white

9.83
#402CA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402CA7
9.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CA7#FFFFFF#000000##FFFFFF
##402CA71.009.832.149.83
#FFFFFF9.831.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AB
Deuteranopia (green-blind)
#003FA5
Tritanopia (blue-blind)
#004E67
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402ca7;
/* rgb */ color: rgb(64, 44, 167);
/* oklch */ color: oklch(40.4% 0.185 281.6);
Tailwind
colors: {
  custom: {
    50: '#8268c2',
    500: '#402ca7',
    950: '#000000',
  },
}
SCSS
$custom: #402ca7;
$custom-light: #8268c2;
$custom-dark: #000000;
JSON
{
  "hex": "#402ca7",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 167
  },
  "hsl": {
    "h": 249.756,
    "s": 58.294,
    "l": 41.373
  },
  "oklch": {
    "l": 0.40353,
    "c": 0.18497,
    "h": 281.6
  },
  "luminance": 0.05681
}

Semantic roles & 50–950 ramp

primary
#402CA7
secondary
#B4C26D
accent
#E246C8
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402CA7

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

Preview Lab → · Contrast checker → · Palette generator →

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