#040017 Hex Color
Almost black, violet underneath

Almost black, #040017 hides a faint purple undertone that keeps it from reading flat. That depth suits dark mode UI, luxury packaging, and moody editorial layouts, especially behind large white type. The hex code delivers a strong 20.6:1 contrast with white, so small body text stays readable. Fine detail tends to sink into it.
Questions about #040017
What is #040017 in RGB, HSL and CMYK?
In RGB, #040017 is rgb(4, 0, 23), in HSL hsl(250, 100%, 5%) and in CMYK 83%, 100%, 0%, 91%. Browse more shades of black with names and hex codes.
What colors pair well with #040017?
Its purple undertone makes warm metallics and muted violets feel richer, so try gold or dusty mauve accents. Cool neutral grays tend to turn muddy next to it.
Is #040017 readable on white or black?
#040017 has a 20.63:1 contrast ratio on white and 1.01: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.