#402A4E#402A4E

#402A4E is a dark, moderate violet. Relative luminance 0.033; OKLCH L 32.8% C 0.067 H 311.3°. Best body text is #FFFFFF at 12.66:1 contrast (WCAG AA passes).

Color values

HEX#402A4E
RGBrgb(64, 42, 78)
HSLhsl(277, 30%, 24%)
HSVhsv(277, 46%, 31%)
CMYKcmyk(17.9%, 46.2%, 0%, 69.4%)
CIE-LABlab(21.19, 18.09, -18.28)
CIE-LCHlch(21.19, 25.71, 314.70°)
OKLaboklab(32.8% 0.0444 -0.0506)
OKLCHoklch(32.8% 0.067 311.3)
XYZxyz(4.3172, 3.2960, 7.6150)
Luminance0.0330 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A4E #384E2A
analogous
#2E2A4E #402A4E #4E2A4A
triadic
#402A4E #4E402A #2A4E40
tetradic
#402A4E #4E2E2A #384E2A #2A4A4E
square
#402A4E #4E2E2A #384E2A #2A4A4E
split-complementary
#402A4E #4A4E2A #2A4E2E
monochromatic
#100B14 #1F1526 #402A4E #613F76 #81559E

Accessibility & contrast

On white

12.66
#402A4E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#402A4E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A4E
12.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A4E#FFFFFF#000000##FFFFFF
##402A4E1.0012.661.6612.66
#FFFFFF12.661.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#23324F
Deuteranopia (green-blind)
#28334D
Tritanopia (blue-blind)
#3F2F38
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #402a4e;
/* rgb */ color: rgb(64, 42, 78);
/* oklch */ color: oklch(32.8% 0.067 311.3);
Tailwind
colors: {
  custom: {
    50: '#75647f',
    500: '#402a4e',
    950: '#000000',
  },
}
SCSS
$custom: #402a4e;
$custom-light: #75647f;
$custom-dark: #000000;
JSON
{
  "hex": "#402a4e",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 78
  },
  "hsl": {
    "h": 276.667,
    "s": 30,
    "l": 23.529
  },
  "oklch": {
    "l": 0.32796,
    "c": 0.06737,
    "h": 311.3
  },
  "luminance": 0.03296
}

Semantic roles & 50–950 ramp

primary
#402A4E
secondary
#658054
accent
#C66289
background
#F7F6F7
surface
#EDEBEE
border
#C8C6C9
text
#08050A
muted
#7B7A7C

Preview Lab

Preview with #402A4E

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

Preview Lab → · Contrast checker → · Palette generator →

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