Midnight Melancholia to The Vast of Night Gradient
CSS
background: linear-gradient(90deg, #002266 0%, #110066 100%);
From Midnight Melancholia (#002266) to The Vast of Night (#110066). The two hues are 30° 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 Melancholia | #002266 | 0, 34, 102 | 220°, 100%, 20% | 100, 67, 0, 60 | |
| 25% (near Midnight Melancholia) | #041A66 | 4, 26, 102 | 227°, 92%, 21% | 96, 75, 0, 60 | |
| 50% (near Dying Storm Blue) | #091166 | 9, 17, 102 | 235°, 84%, 22% | 91, 83, 0, 60 | |
| 75% (near Dying Storm Blue) | #0D0966 | 13, 9, 102 | 243°, 84%, 22% | 87, 91, 0, 60 | |
| The Vast of Night | #110066 | 17, 0, 102 | 250°, 100%, 20% | 83, 100, 0, 60 |
Halfway along, the gradient is #091166, closest to the named color Dying Storm Blue. 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.17:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #002266, #110066) - Diagonal:
linear-gradient(135deg, #002266, #110066) - Radial, from the center out:
radial-gradient(circle, #002266, #110066) - Tailwind CSS:
bg-gradient-to-r from-[#002266] to-[#110066]
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 Midnight Melancholia to The Vast of Night gradient?
It starts at #002266 (Midnight Melancholia) and ends at #110066 (The Vast of Night), with #091166 in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #002266, #110066) runs from The Vast of Night on the left to Midnight Melancholia on the right.