Dark Moon to Midnight Edition Gradient
CSS
background: linear-gradient(90deg, #161718 0%, #0c121b 100%);
From Dark Moon (#161718) to Midnight Edition (#0C121B). The two hues are 6° apart on the color wheel, close enough that the blend stays clean without a muddy middle.
Colors along the gradient
| Name | HEX | RGB | HSL | CMYK | |
|---|---|---|---|---|---|
| Dark Moon | #161718 | 22, 23, 24 | 210°, 4%, 9% | 8, 4, 0, 91 | |
| 25% (near Dark Moon) | #141619 | 20, 22, 25 | 216°, 11%, 9% | 20, 12, 0, 90 | |
| 50% (near Dark Void) | #11151A | 17, 21, 26 | 213°, 21%, 8% | 35, 19, 0, 90 | |
| 75% (near Midnight Edition) | #0F131A | 15, 19, 26 | 218°, 27%, 8% | 42, 27, 0, 90 | |
| Midnight Edition | #0C121B | 12, 18, 27 | 216°, 38%, 8% | 56, 33, 0, 89 |
Halfway along, the gradient is #11151A, closest to the named color Dark Void. The stops are mixed in RGB, the way browsers draw a linear gradient by default.
Text on this gradient
White text reads best on both ends, so one text color works across the whole gradient. The two end colors have a contrast ratio of 1.05:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #161718, #0c121b) - Diagonal:
linear-gradient(135deg, #161718, #0c121b) - Radial, from the center out:
radial-gradient(circle, #161718, #0c121b) - Tailwind CSS:
bg-gradient-to-r from-[#161718] to-[#0c121b]
Gradients like this work well for page headers, buttons, cards and slide backgrounds. Keep body text on a solid color for the best readability.
Related gradients
Questions
What are the HEX codes of the Dark Moon to Midnight Edition gradient?
It starts at #161718 (Dark Moon) and ends at #0C121B (Midnight Edition), with #11151A in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #161718, #0c121b) runs from Midnight Edition on the left to Dark Moon on the right.