#402038#402038

#402038 is a dark, moderate pink. Relative luminance 0.024; OKLCH L 29.7% C 0.061 H 337.1°. Best body text is #FFFFFF at 14.17:1 contrast (WCAG AA passes).

Color values

HEX#402038
RGBrgb(64, 32, 56)
HSLhsl(315, 33%, 19%)
HSVhsv(315, 50%, 25%)
CMYKcmyk(0%, 50%, 12.5%, 74.9%)
CIE-LABlab(17.50, 19.45, -8.89)
CIE-LCHlch(17.50, 21.38, 335.44°)
OKLaboklab(29.66% 0.0565 -0.0239)
OKLCHoklch(29.66% 0.061 337.1)
XYZxyz(3.3447, 2.4087, 4.0294)
Luminance0.0241 (WCAG relative)
Temperaturewarm
Familypink

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402038 #204028
analogous
#382040 #402038 #402028
triadic
#402038 #384020 #203840
tetradic
#402038 #403820 #204028 #202840
square
#402038 #403820 #204028 #202840
split-complementary
#402038 #284020 #204038
monochromatic
#140A12 #170C14 #402038 #69345C #92497F

Accessibility & contrast

On white

14.17
#402038 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#402038 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402038
14.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402038#FFFFFF#000000##FFFFFF
##4020381.0014.171.4814.17
#FFFFFF14.171.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#212839
Deuteranopia (green-blind)
#292D37
Tritanopia (blue-blind)
#432129
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #402038;
/* rgb */ color: rgb(64, 32, 56);
/* oklch */ color: oklch(29.7% 0.061 337.1);
Tailwind
colors: {
  custom: {
    50: '#765c6e',
    500: '#402038',
    950: '#000000',
  },
}
SCSS
$custom: #402038;
$custom-light: #765c6e;
$custom-dark: #000000;
JSON
{
  "hex": "#402038",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 56
  },
  "hsl": {
    "h": 315,
    "s": 33.333,
    "l": 18.824
  },
  "oklch": {
    "l": 0.29662,
    "c": 0.06132,
    "h": 337.1
  },
  "luminance": 0.02409
}

Semantic roles & 50–950 ramp

primary
#402038
secondary
#487453
accent
#C9795E
background
#F7F5F6
surface
#EDE9EC
border
#C8C5C7
text
#080407
muted
#7B797A

Preview Lab

Preview with #402038

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

Preview Lab → · Contrast checker → · Palette generator →

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