#400542#400542

#400542 is a dark, moderate purple. Relative luminance 0.016; OKLCH L 26.7% C 0.115 H 326.7°. Best body text is #FFFFFF at 15.93:1 contrast (WCAG AA passes).

Color values

HEX#400542
RGBrgb(64, 5, 66)
HSLhsl(298, 86%, 14%)
HSVhsv(298, 92%, 26%)
CMYKcmyk(3%, 92.4%, 0%, 74.1%)
CIE-LABlab(13.18, 34.85, -22.69)
CIE-LCHlch(13.18, 41.59, 326.94°)
OKLaboklab(26.7% 0.0961 -0.0631)
OKLCHoklch(26.7% 0.115 326.7)
XYZxyz(3.1519, 1.5921, 5.2945)
Luminance0.0159 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400542 #074205
analogous
#220542 #400542 #420526
triadic
#400542 #424005 #054240
tetradic
#400542 #422205 #074205 #052642
square
#400542 #422205 #074205 #052642
split-complementary
#400542 #264205 #054222
monochromatic
#1C021C #1C021C #400542 #77097B #AE0EB4

Accessibility & contrast

On white

15.93
#400542 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.32
#400542 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400542
15.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400542#FFFFFF#000000##FFFFFF
##4005421.0015.931.3215.93
#FFFFFF15.931.0021.001.00
#0000001.3221.001.0021.00
##FFFFFF15.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001D44
Deuteranopia (green-blind)
#152441
Tritanopia (blue-blind)
#421124
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #400542;
/* rgb */ color: rgb(64, 5, 66);
/* oklch */ color: oklch(26.7% 0.115 326.7);
Tailwind
colors: {
  custom: {
    50: '#784e77',
    500: '#400542',
    950: '#000000',
  },
}
SCSS
$custom: #400542;
$custom-light: #784e77;
$custom-dark: #000000;
JSON
{
  "hex": "#400542",
  "rgb": {
    "r": 64,
    "g": 5,
    "b": 66
  },
  "hsl": {
    "h": 298.033,
    "s": 85.915,
    "l": 13.922
  },
  "oklch": {
    "l": 0.26696,
    "c": 0.11501,
    "h": 326.7
  },
  "luminance": 0.01592
}

Semantic roles & 50–950 ramp

primary
#400542
secondary
#248220
accent
#FC2C33
background
#F7F4F7
surface
#EDE7ED
border
#C8C3C8
text
#090208
muted
#7B787B

Preview Lab

Preview with #400542

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

Preview Lab → · Contrast checker → · Palette generator →

#400542 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva