#402C8D#402C8D

#402C8D is a dark, vivid violet. Relative luminance 0.048; OKLCH L 37.9% C 0.152 H 286.1°. Best body text is #FFFFFF at 10.70:1 contrast (WCAG AA passes).

Color values

HEX#402C8D
RGBrgb(64, 44, 141)
HSLhsl(252, 52%, 36%)
HSVhsv(252, 69%, 55%)
CMYKcmyk(54.6%, 68.8%, 0%, 44.7%)
CIE-LABlab(26.20, 35.59, -50.86)
CIE-LCHlch(26.20, 62.08, 304.98°)
OKLaboklab(37.91% 0.0422 -0.1461)
OKLCHoklch(37.91% 0.152 286.1)
XYZxyz(7.8213, 4.8140, 25.7112)
Luminance0.0481 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C8D #798D2C
analogous
#2C498D #402C8D #712C8D
triadic
#402C8D #8D402C #2C8D40
tetradic
#402C8D #8D2C49 #798D2C #2C8D71
square
#402C8D #8D2C49 #798D2C #2C8D71
split-complementary
#402C8D #8D712C #498D2C
monochromatic
#160F30 #2B1D5E #402C8D #553BBC #7A65CF

Accessibility & contrast

On white

10.70
#402C8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#402C8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402C8D
10.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C8D#FFFFFF#000000##FFFFFF
##402C8D1.0010.701.9610.70
#FFFFFF10.701.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004190
Deuteranopia (green-blind)
#003B8B
Tritanopia (blue-blind)
#204558
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402c8d;
/* rgb */ color: rgb(64, 44, 141);
/* oklch */ color: oklch(37.9% 0.152 286.1);
Tailwind
colors: {
  custom: {
    50: '#7d67af',
    500: '#402c8d',
    950: '#000000',
  },
}
SCSS
$custom: #402c8d;
$custom-light: #7d67af;
$custom-dark: #000000;
JSON
{
  "hex": "#402c8d",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 141
  },
  "hsl": {
    "h": 252.371,
    "s": 52.432,
    "l": 36.275
  },
  "oklch": {
    "l": 0.3791,
    "c": 0.15207,
    "h": 286.1
  },
  "luminance": 0.04814
}

Semantic roles & 50–950 ramp

primary
#402C8D
secondary
#A4B560
accent
#DC4CBE
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402C8D

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

Preview Lab → · Contrast checker → · Palette generator →

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