#40171C#40171C

#40171C is a dark, moderate red. Relative luminance 0.018; OKLCH L 26.9% C 0.064 H 15.0°. Best body text is #FFFFFF at 15.47:1 contrast (WCAG AA passes).

Color values

HEX#40171C
RGBrgb(64, 23, 28)
HSLhsl(353, 47%, 17%)
HSVhsv(353, 64%, 25%)
CMYKcmyk(0%, 64.1%, 56.2%, 74.9%)
CIE-LABlab(14.33, 20.52, 6.52)
CIE-LCHlch(14.33, 21.53, 17.62°)
OKLaboklab(26.94% 0.0619 0.0166)
OKLCHoklch(26.94% 0.064 15)
XYZxyz(2.6305, 1.7869, 1.3048)
Luminance0.0179 (WCAG relative)
Temperaturewarm
Familyred

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40171C #17403B
analogous
#401731 #40171C #402717
triadic
#40171C #1C4017 #171C40
tetradic
#40171C #314017 #17403B #271740
square
#40171C #314017 #17403B #271740
split-complementary
#40171C #174027 #173140
monochromatic
#17080A #17080A #40171C #6D2730 #9A3743

Accessibility & contrast

On white

15.47
#40171C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#40171C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40171C
15.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40171C#FFFFFF#000000##FFFFFF
##40171C1.0015.471.3615.47
#FFFFFF15.471.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#201F1C
Deuteranopia (green-blind)
#2A271B
Tritanopia (blue-blind)
#461119
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #40171c;
/* rgb */ color: rgb(64, 23, 28);
/* oklch */ color: oklch(26.9% 0.064 15.0);
Tailwind
colors: {
  custom: {
    50: '#785657',
    500: '#40171c',
    950: '#000000',
  },
}
SCSS
$custom: #40171c;
$custom-light: #785657;
$custom-dark: #000000;
JSON
{
  "hex": "#40171c",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 28
  },
  "hsl": {
    "h": 352.683,
    "s": 47.126,
    "l": 17.059
  },
  "oklch": {
    "l": 0.26939,
    "c": 0.06405,
    "h": 15
  },
  "luminance": 0.01787
}

Semantic roles & 50–950 ramp

primary
#40171C
secondary
#3C7770
accent
#D7C651
background
#F7F5F5
surface
#EDE9E9
border
#C8C5C5
text
#090303
muted
#7B7878

Preview Lab

Preview with #40171C

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

Preview Lab → · Contrast checker → · Palette generator →

#40171C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva