Toolman

#404040 color

#404040#404040

#404040 is a dark, desaturated grey, closest to the CSS named color darkslategray (#2F4F4F).

Color values

HEX#404040
RGBrgb(64, 64, 64)
HSLhsl(0, 0%, 25%)
CMYKcmyk(0%, 0%, 0%, 75%)
Decimal4210752
CSScolor: #404040;
Android0xFF404040
SwiftUIColor(red: 0.251, green: 0.251, blue: 0.251, alpha: 1)

Accessibility and contrast

White text on #40404010.37:1 — AA pass · AA large pass · AAA pass
Black text on #4040402.03:1 — AA fail · AA large fail · AAA fail
Recommended text colorwhite

WCAG 2.1 asks for at least 4.5:1 for body text and 3:1 for large text (18 pt, or 14 pt bold).

Tints and shades of #404040

Each swatch keeps the hue and saturation of #404040 and varies only lightness — the quickest way to build a usable scale from a single brand color.

95%
85%
75%
65%
55%
45%
35%
25%
15%

Colors that go with #404040

Harmonies generated by rotating the hue on the color wheel while holding saturation and lightness constant.

Complementary
Triadic +120°
Triadic +240°
Analogous −30°
Analogous +30°
Split −150°
Split +150°

Using #404040 in code

/* CSS */
.element { color: #404040; background-color: #404040; }
.element { color: rgb(64 64 64); }
.element { color: hsl(0 0% 25%); }

/* Tailwind arbitrary value */
<div class="bg-[#404040] text-white">

/* SCSS variable */
$brand: #404040;

Frequently asked questions

What color is #404040?

#404040 is a dark, desaturated grey. Its hue sits at 0° on the color wheel, with 0% saturation and 25% lightness.

What is #404040 in RGB?

#404040 converts to rgb(64, 64, 64) — 64 red, 64 green and 64 blue.

What is #404040 in CMYK?

Approximately cmyk(0%, 0%, 0%, 75%). Print output depends on the ICC profile of the press and paper, so treat this as a starting point rather than an exact match.

Should text on #404040 be white or black?

White gives the better contrast ratio (10.37:1 versus 2.03:1).

What is the complementary color of #404040?

#404040 — the hue directly opposite #404040 on the color wheel.

Convert any color → · Browse all colors