#1F1F1F Hex Color

Online color picker to view shades, tints, color codes, and complementary colors

Hex color #1f1f1f graphic
This near-black charcoal grey provides a sophisticated base for modern UI design. It feels neutral and grounded, offering a softer alternative to pure black. Because it maintains a high 16.5:1 contrast ratio with white text, the color excels in dark mode interfaces. Designers rely on this hex code for clean, professional backgrounds that avoid looking too harsh on the eyes.

Questions about #1f1f1f

What is #1f1f1f in RGB, HSL and CMYK?
In RGB, #1f1f1f is rgb(31, 31, 31), in HSL hsl(0, 0%, 12%) and in CMYK 0%, 0%, 0%, 88%.
Is #1f1f1f a better choice than pure black for UI design?
#1f1f1f is significantly better for most screen-based interfaces because it reduces eye strain caused by the harsh contrast of pure black against white text. It provides a softer, more sophisticated aesthetic while still offering the depth required for modern dark mode backgrounds.
What colors pair well with #1f1f1f?
This near-black charcoal works best with vibrant accent colors or soft, desaturated tones to maintain readability and visual interest. It serves as an excellent neutral base, allowing high-saturation colors like electric blue or warm gold to pop without competing for attention.
Is #1f1f1f readable on white or black?
#1f1f1f has a 16.48:1 contrast ratio on white and 1.27:1 on black. WCAG asks for 4.5:1 for body text and 3:1 for large text, so on white it works for body text and on black it is too faint for text. Try other pairs in the contrast checker.