#40171B#40171B

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

Color values

HEX#40171B
RGBrgb(64, 23, 27)
HSLhsl(354, 47%, 17%)
HSVhsv(354, 64%, 25%)
CMYKcmyk(0%, 64.1%, 57.8%, 74.9%)
CIE-LABlab(14.30, 20.41, 7.21)
CIE-LCHlch(14.30, 21.65, 19.46°)
OKLaboklab(26.91% 0.0614 0.0182)
OKLCHoklch(26.91% 0.064 16.5)
XYZxyz(2.6188, 1.7822, 1.2428)
Luminance0.0178 (WCAG relative)
Temperaturewarm
Familyred

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40171B #17403C
analogous
#401730 #40171B #402817
triadic
#40171B #1B4017 #171B40
tetradic
#40171B #304017 #17403C #281740
square
#40171B #304017 #17403C #281740
split-complementary
#40171B #174028 #173040
monochromatic
#170809 #170809 #40171B #6D272E #9A3741

Accessibility & contrast

On white

15.48
#40171B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40171B
15.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40171B#FFFFFF#000000##FFFFFF
##40171B1.0015.481.3615.48
#FFFFFF15.481.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.481.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40171b;
/* rgb */ color: rgb(64, 23, 27);
/* oklch */ color: oklch(26.9% 0.064 16.5);
Tailwind
colors: {
  custom: {
    50: '#785657',
    500: '#40171b',
    950: '#000000',
  },
}
SCSS
$custom: #40171b;
$custom-light: #785657;
$custom-dark: #000000;
JSON
{
  "hex": "#40171b",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 27
  },
  "hsl": {
    "h": 354.146,
    "s": 47.126,
    "l": 17.059
  },
  "oklch": {
    "l": 0.2691,
    "c": 0.06403,
    "h": 16.5
  },
  "luminance": 0.01782
}

Semantic roles & 50–950 ramp

primary
#40171B
secondary
#3C7771
accent
#D7CA51
background
#F7F5F5
surface
#EDE9E9
border
#C8C5C5
text
#090303
muted
#7B7878

Preview Lab

Preview with #40171B

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

Preview Lab → · Contrast checker → · Palette generator →

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