#040E21 Hex Color
Online color picker to view shades, tints, color codes, and complementary colors

Barely blue at first glance, this near-black shade gives up its hue only in soft light. The hex code #040e21 works best as a dominant base in dark mode UI, where white text hits roughly 19.3:1 contrast. Its muted, sooty undertone flatters warm accents like amber or rust. A reliable choice when plain black feels too harsh.
Questions about #040e21
What is #040e21 in RGB, HSL and CMYK?
In RGB, #040e21 is rgb(4, 14, 33), in HSL hsl(219, 78%, 7%) and in CMYK 88%, 58%, 0%, 87%. Browse more shades of black with names and hex codes.
What colors pair well with #040e21?
Warm, saturated accents flatter it best. Amber, rust, and gold pop against the near-black base, while white or pale gray text keeps layouts readable. Avoid muted midtones, which sink in and turn muddy.
Is #040e21 readable on white or black?
#040e21 has a 19.26:1 contrast ratio on white and 1.08: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.