#402AC7#402AC7

#402AC7 is a dark, highly saturated blue. Relative luminance 0.069; OKLCH L 43.4% C 0.225 H 277.8°. Best body text is #FFFFFF at 8.85:1 contrast (WCAG AA passes).

Color values

HEX#402AC7
RGBrgb(64, 42, 199)
HSLhsl(248, 65%, 47%)
HSVhsv(248, 79%, 78%)
CMYKcmyk(67.8%, 78.9%, 0%, 22%)
CIE-LABlab(31.51, 54.48, -77.04)
CIE-LCHlch(31.51, 94.35, 305.27°)
OKLaboklab(43.37% 0.0304 -0.2226)
OKLCHoklch(43.37% 0.225 277.8)
XYZxyz(13.2478, 6.8683, 54.6493)
Luminance0.0687 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AC7 #B1C72A
analogous
#2A62C7 #402AC7 #8F2AC7
triadic
#402AC7 #C7402A #2AC740
tetradic
#402AC7 #C72A62 #B1C72A #2AC78F
square
#402AC7 #C72A62 #B1C72A #2AC78F
split-complementary
#402AC7 #C78F2A #62C72A
monochromatic
#1F1562 #301F94 #402AC7 #6653DB #9386E5

Accessibility & contrast

On white

8.85
#402AC7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.37
#402AC7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AC7
8.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AC7#FFFFFF#000000##FFFFFF
##402AC71.008.852.378.85
#FFFFFF8.851.0021.001.00
#0000002.3721.001.0021.00
##FFFFFF8.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050CB
Deuteranopia (green-blind)
#0044C4
Tritanopia (blue-blind)
#005A79
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #402ac7;
/* rgb */ color: rgb(64, 42, 199);
/* oklch */ color: oklch(43.4% 0.225 277.8);
Tailwind
colors: {
  custom: {
    50: '#8868d9',
    500: '#402ac7',
    950: '#000000',
  },
}
SCSS
$custom: #402ac7;
$custom-light: #8868d9;
$custom-dark: #000000;
JSON
{
  "hex": "#402ac7",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 199
  },
  "hsl": {
    "h": 248.408,
    "s": 65.145,
    "l": 47.255
  },
  "oklch": {
    "l": 0.43373,
    "c": 0.22464,
    "h": 277.8
  },
  "luminance": 0.06869
}

Semantic roles & 50–950 ramp

primary
#402AC7
secondary
#C3CF7E
accent
#E840D1
background
#F9F6FD
surface
#F1EBFB
border
#CBC6D4
text
#0D0615
muted
#7E7A83

Preview Lab

Preview with #402AC7

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

Preview Lab → · Contrast checker → · Palette generator →

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