#402A42#402A42

#402A42 is a dark, muted purple. Relative luminance 0.031; OKLCH L 32.1% C 0.051 H 323.8°. Best body text is #FFFFFF at 12.90:1 contrast (WCAG AA passes).

Color values

HEX#402A42
RGBrgb(64, 42, 66)
HSLhsl(295, 22%, 21%)
HSVhsv(295, 36%, 26%)
CMYKcmyk(3%, 36.4%, 0%, 74.1%)
CIE-LABlab(20.59, 15.10, -11.07)
CIE-LCHlch(20.59, 18.73, 323.75°)
OKLaboklab(32.15% 0.0411 -0.0301)
OKLCHoklch(32.15% 0.051 323.8)
XYZxyz(3.9256, 3.1394, 5.5524)
Luminance0.0314 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A42 #2C422A
analogous
#342A42 #402A42 #422A38
triadic
#402A42 #42402A #2A4240
tetradic
#402A42 #42342A #2C422A #2A3842
square
#402A42 #42342A #2C422A #2A3842
split-complementary
#402A42 #38422A #2A4234
monochromatic
#120C13 #1C121D #402A42 #644267 #895A8D

Accessibility & contrast

On white

12.90
#402A42 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#402A42 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A42
12.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A42#FFFFFF#000000##FFFFFF
##402A421.0012.901.6312.90
#FFFFFF12.901.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#283043
Deuteranopia (green-blind)
#2D3341
Tritanopia (blue-blind)
#412C33
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #402a42;
/* rgb */ color: rgb(64, 42, 66);
/* oklch */ color: oklch(32.1% 0.051 323.8);
Tailwind
colors: {
  custom: {
    50: '#756476',
    500: '#402a42',
    950: '#000000',
  },
}
SCSS
$custom: #402a42;
$custom-light: #756476;
$custom-dark: #000000;
JSON
{
  "hex": "#402a42",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 66
  },
  "hsl": {
    "h": 295,
    "s": 22.222,
    "l": 21.176
  },
  "oklch": {
    "l": 0.32147,
    "c": 0.05098,
    "h": 323.8
  },
  "luminance": 0.03139
}

Semantic roles & 50–950 ramp

primary
#402A42
secondary
#577354
accent
#BF6970
background
#F7F5F7
surface
#EDEAED
border
#C8C6C8
text
#080508
muted
#7B797B

Preview Lab

Preview with #402A42

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

Preview Lab → · Contrast checker → · Palette generator →

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