#402C8E#402C8E

#402C8E is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.0% C 0.153 H 285.9°. Best body text is #FFFFFF at 10.67:1 contrast (WCAG AA passes).

Color values

HEX#402C8E
RGBrgb(64, 44, 142)
HSLhsl(252, 53%, 36%)
HSVhsv(252, 69%, 56%)
CMYKcmyk(54.9%, 69%, 0%, 44.3%)
CIE-LABlab(26.29, 35.91, -51.34)
CIE-LCHlch(26.29, 62.65, 304.97°)
OKLaboklab(38% 0.042 -0.1475)
OKLCHoklch(38% 0.153 285.9)
XYZxyz(7.8961, 4.8439, 26.1048)
Luminance0.0484 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C8E #7A8E2C
analogous
#2C498E #402C8E #712C8E
triadic
#402C8E #8E402C #2C8E40
tetradic
#402C8E #8E2C49 #7A8E2C #2C8E71
square
#402C8E #8E2C49 #7A8E2C #2C8E71
split-complementary
#402C8E #8E712C #498E2C
monochromatic
#160F31 #2B1E5F #402C8E #553ABD #7B65CF

Accessibility & contrast

On white

10.67
#402C8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#402C8E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402C8E
10.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C8E#FFFFFF#000000##FFFFFF
##402C8E1.0010.671.9710.67
#FFFFFF10.671.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004191
Deuteranopia (green-blind)
#003B8C
Tritanopia (blue-blind)
#204559
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402c8e;
/* rgb */ color: rgb(64, 44, 142);
/* oklch */ color: oklch(38.0% 0.153 285.9);
Tailwind
colors: {
  custom: {
    50: '#7d67b0',
    500: '#402c8e',
    950: '#000000',
  },
}
SCSS
$custom: #402c8e;
$custom-light: #7d67b0;
$custom-dark: #000000;
JSON
{
  "hex": "#402c8e",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 142
  },
  "hsl": {
    "h": 252.245,
    "s": 52.688,
    "l": 36.471
  },
  "oklch": {
    "l": 0.38,
    "c": 0.15337,
    "h": 285.9
  },
  "luminance": 0.04844
}

Semantic roles & 50–950 ramp

primary
#402C8E
secondary
#A4B660
accent
#DC4CBF
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0A0611
muted
#7C7A80

Preview Lab

Preview with #402C8E

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

Preview Lab → · Contrast checker → · Palette generator →

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