#40172B#40172B

#40172B is a dark, moderate pink. Relative luminance 0.019; OKLCH L 27.5% C 0.069 H 352.1°. Best body text is #FFFFFF at 15.27:1 contrast (WCAG AA passes).

Color values

HEX#40172B
RGBrgb(64, 23, 43)
HSLhsl(331, 47%, 17%)
HSVhsv(331, 64%, 25%)
CMYKcmyk(0%, 64.1%, 32.8%, 74.9%)
CIE-LABlab(14.83, 22.57, -3.67)
CIE-LCHlch(14.83, 22.87, 350.78°)
OKLaboklab(27.48% 0.0684 -0.0094)
OKLCHoklch(27.48% 0.069 352.1)
XYZxyz(2.8569, 1.8775, 2.4970)
Luminance0.0188 (WCAG relative)
Temperaturewarm
Familypink

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40172B #17402C
analogous
#401740 #40172B #401817
triadic
#40172B #2B4017 #172B40
tetradic
#40172B #404017 #17402C #181740
square
#40172B #404017 #17402C #181740
split-complementary
#40172B #174018 #174040
monochromatic
#17080F #17080F #40172B #6D2749 #9A3767

Accessibility & contrast

On white

15.27
#40172B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.38
#40172B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40172B
15.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40172B#FFFFFF#000000##FFFFFF
##40172B1.0015.271.3815.27
#FFFFFF15.271.0021.001.00
#0000001.3821.001.0021.00
##FFFFFF15.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1C212C
Deuteranopia (green-blind)
#27282A
Tritanopia (blue-blind)
#45151F
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #40172b;
/* rgb */ color: rgb(64, 23, 43);
/* oklch */ color: oklch(27.5% 0.069 352.1);
Tailwind
colors: {
  custom: {
    50: '#775664',
    500: '#40172b',
    950: '#000000',
  },
}
SCSS
$custom: #40172b;
$custom-light: #775664;
$custom-dark: #000000;
JSON
{
  "hex": "#40172b",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 43
  },
  "hsl": {
    "h": 330.732,
    "s": 47.126,
    "l": 17.059
  },
  "oklch": {
    "l": 0.27482,
    "c": 0.06907,
    "h": 352.1
  },
  "luminance": 0.01877
}

Semantic roles & 50–950 ramp

primary
#40172B
secondary
#3C775A
accent
#D79651
background
#F7F5F5
surface
#EDE9EA
border
#C8C5C6
text
#090305
muted
#7B7879

Preview Lab

Preview with #40172B

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

Preview Lab → · Contrast checker → · Palette generator →

#40172B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva