#402AC1#402AC1

#402AC1 is a dark, highly saturated blue. Relative luminance 0.066; OKLCH L 42.7% C 0.218 H 278.5°. Best body text is #FFFFFF at 9.05:1 contrast (WCAG AA passes).

Color values

HEX#402AC1
RGBrgb(64, 42, 193)
HSLhsl(249, 64%, 46%)
HSVhsv(249, 78%, 76%)
CMYKcmyk(66.8%, 78.2%, 0%, 24.3%)
CIE-LABlab(30.87, 52.70, -74.57)
CIE-LCHlch(30.87, 91.31, 305.25°)
OKLaboklab(42.74% 0.0321 -0.2154)
OKLCHoklch(42.74% 0.218 278.5)
XYZxyz(12.5649, 6.5951, 51.0526)
Luminance0.0660 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AC1 #ABC12A
analogous
#2A5FC1 #402AC1 #8B2AC1
triadic
#402AC1 #C1402A #2AC140
tetradic
#402AC1 #C12A5F #ABC12A #2AC18B
square
#402AC1 #C12A5F #ABC12A #2AC18B
split-complementary
#402AC1 #C18B2A #5FC12A
monochromatic
#1F145C #2F1F8F #402AC1 #634FD9 #9082E4

Accessibility & contrast

On white

9.05
#402AC1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.32
#402AC1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AC1
9.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AC1#FFFFFF#000000##FFFFFF
##402AC11.009.052.329.05
#FFFFFF9.051.0021.001.00
#0000002.3221.001.0021.00
##FFFFFF9.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EC5
Deuteranopia (green-blind)
#0042BE
Tritanopia (blue-blind)
#005775
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #402ac1;
/* rgb */ color: rgb(64, 42, 193);
/* oklch */ color: oklch(42.7% 0.218 278.5);
Tailwind
colors: {
  custom: {
    50: '#8768d5',
    500: '#402ac1',
    950: '#000000',
  },
}
SCSS
$custom: #402ac1;
$custom-light: #8768d5;
$custom-dark: #000000;
JSON
{
  "hex": "#402ac1",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 193
  },
  "hsl": {
    "h": 248.742,
    "s": 64.255,
    "l": 46.078
  },
  "oklch": {
    "l": 0.4274,
    "c": 0.21776,
    "h": 278.5
  },
  "luminance": 0.06596
}

Semantic roles & 50–950 ramp

primary
#402AC1
secondary
#C1CD7A
accent
#E741CF
background
#F9F6FD
surface
#F1EBFA
border
#CBC6D3
text
#0D0614
muted
#7E7A83

Preview Lab

Preview with #402AC1

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

Preview Lab → · Contrast checker → · Palette generator →

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