Starry Night to Royal Night Gradient
CSS
background: linear-gradient(90deg, #286492 0%, #2b3191 100%);
From Starry Night (#286492) to Royal Night (#2B3191). 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 | |
|---|---|---|---|---|---|
| Starry Night | #286492 | 40, 100, 146 | 206°, 57%, 36% | 73, 32, 0, 43 | |
| 25% (near Nightly Activities) | #295792 | 41, 87, 146 | 214°, 56%, 37% | 72, 40, 0, 43 | |
| 50% (near Nightly Activities) | #2A4B92 | 42, 75, 146 | 221°, 55%, 37% | 71, 49, 0, 43 | |
| 75% (near Liquid Denim) | #2A3E91 | 42, 62, 145 | 228°, 55%, 37% | 71, 57, 0, 43 | |
| Royal Night | #2B3191 | 43, 49, 145 | 236°, 54%, 37% | 70, 66, 0, 43 |
Halfway along, the gradient is #2A4B92, closest to the named color Nightly Activities. 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.71:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #286492, #2b3191) - Diagonal:
linear-gradient(135deg, #286492, #2b3191) - Radial, from the center out:
radial-gradient(circle, #286492, #2b3191) - Tailwind CSS:
bg-gradient-to-r from-[#286492] to-[#2b3191]
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 Starry Night to Royal Night gradient?
It starts at #286492 (Starry Night) and ends at #2B3191 (Royal Night), with #2A4B92 in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #286492, #2b3191) runs from Royal Night on the left to Starry Night on the right.