#040C38 Hex Color

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

Hex color #040c38 graphic
Dark and heavily muted, #040c38 is a cold blue with a nearly black navy cast. Its low lightness creates a serious, controlled mood suited to security, finance, government, and formal interfaces. Use the hex code as a dominant dark-mode background with white text, which provides about 18.8:1 contrast, then add burgundy or pale blue accents for definition.

Questions about #040c38

What is #040c38 in RGB, HSL and CMYK?
In RGB, #040c38 is rgb(4, 12, 56), in HSL hsl(231, 87%, 12%) and in CMYK 93%, 79%, 0%, 78%.
What colors pair well with #040c38?
#040c38 pairs well with white, pale blue, and restrained burgundy accents. White creates crisp contrast, pale blue adds cool definition, and burgundy introduces warmth without overpowering the near-black navy base.
Does #040c38 read as a warm or cool color?
#040c38 reads as a very cool color because its blue hue is heavily muted and pushed toward a nearly black navy, creating a controlled, formal impression that feels more distant and restrained than a brighter or warmer blue. That coolness can be softened with warm accents.
Where does #040c38 work best in design?
Use #040c38 for dark-mode backgrounds, security dashboards, finance tools, and formal interfaces where a serious, low-distraction visual foundation matters. Its low lightness keeps surrounding content visually focused while brighter text and accents establish clear hierarchy.
Is #040c38 readable on white or black?
#040c38 has a 18.83:1 contrast ratio on white and 1.11: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.