Midnight Pines to Nightmare Gradient
CSS
background: linear-gradient(90deg, #17240b 0%, #112211 100%);
From Midnight Pines (#17240B) to Nightmare (#112211). The two hues are 29° 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 | |
|---|---|---|---|---|---|
| Midnight Pines | #17240B | 23, 36, 11 | 91°, 53%, 9% | 36, 0, 69, 86 | |
| 25% (near Midnight Pines) | #16240D | 22, 36, 13 | 97°, 47%, 10% | 39, 0, 64, 86 | |
| 50% (near Midnight Pines) | #14230E | 20, 35, 14 | 103°, 43%, 10% | 43, 0, 60, 86 | |
| 75% (near Nightmare) | #132310 | 19, 35, 16 | 111°, 37%, 10% | 46, 0, 54, 86 | |
| Nightmare | #112211 | 17, 34, 17 | 120°, 33%, 10% | 50, 0, 50, 87 |
Halfway along, the gradient is #14230E, closest to the named color Midnight Pines. 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.03:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #17240b, #112211) - Diagonal:
linear-gradient(135deg, #17240b, #112211) - Radial, from the center out:
radial-gradient(circle, #17240b, #112211) - Tailwind CSS:
bg-gradient-to-r from-[#17240b] to-[#112211]
Gradients like this work well for page headers, buttons, cards and slide backgrounds. Keep body text on a solid color for the best readability.
Questions
What are the HEX codes of the Midnight Pines to Nightmare gradient?
It starts at #17240B (Midnight Pines) and ends at #112211 (Nightmare), with #14230E in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #17240b, #112211) runs from Nightmare on the left to Midnight Pines on the right.