Midnight Hex Code — #121212
RGB, HSL, and CMYK values for Midnight.
Last updated: April 6, 2026
Midnight Color Values
| Format | Value |
|---|---|
| HEX | #121212 |
| RGB | rgb(18, 18, 18) |
| HSL | hsl(0, 0%, 7%) |
| CMYK | cmyk(0%, 0%, 0%, 93%) |
About Midnight
Color psychology: Mystery, depth.
Midnight (#121212) is a dark shade of black with a hue angle of 0° on the color wheel, 0% saturation, and 7% lightness. It's commonly used in web design, graphic design, and branding where mystery, depth are desired associations.
In color theory, Midnight sits in the warm section of the spectrum. Its low saturation creates a muted, understated tone — great for backgrounds, borders, and subtle UI elements.
When to Use Midnight in Design
Web Design
Use Midnight for headings, links, or accent elements against light backgrounds. Dark colors like this provide strong contrast and draw the eye to important content.
Branding & Logo
Midnight conveys mystery, depth — consider it for brands that want to project these qualities. Test it at small sizes (favicon, social avatar) to ensure it remains recognizable.
Print Design
Use the CMYK values (C:0% M:0% Y:0% K:93%) for accurate print reproduction in brochures, business cards, and packaging. Request a physical proof — screen colors often appear more vibrant than their printed equivalents.
UI / UX Design
Dark colors like Midnight are effective for primary buttons, navigation bars, and text. Use a lighter tint (increase HSL lightness to 90%+) for hover backgrounds.
How to Use Midnight in CSS
/* Using HEX */ color: #121212; background-color: #121212; /* Using RGB */ color: rgb(18, 18, 18); /* Using HSL — best for creating variations */ color: hsl(0, 0%, 7%); /* Transparent overlay (50% opacity) */ background-color: rgba(18, 18, 18, 0.5); /* Lighter variant for hover states */ background-color: hsl(0, 0%, 17%); /* Darker variant for active states */ background-color: hsl(0, 0%, 5%);
HSL is the most flexible format for creating color systems. By adjusting the lightness value, you can generate an entire shade scale from Midnight without changing its core hue or saturation.
Colors That Go With Midnight
Complementary
Analogous
Triadic
Similar Shades of Black
Frequently Asked Questions
What is the hex code for Midnight?
What is Midnight in RGB and when should I use RGB?
How to use Midnight in CSS with different color formats?
What is the HSL value of Midnight and why is HSL useful for designers?
What is the CMYK value of Midnight for print design?
What colors pair well with Midnight in design projects?
Is Midnight (#121212) accessible for web design and WCAG compliant?
Was this page helpful?
Written by
Tamanna Tasnim
Senior Full Stack Developer
Full-stack developer with deep expertise in data formats, APIs, and developer tooling. Writes in-depth technical comparisons and conversion guides backed by hands-on engineering experience across modern web stacks.