Deep Blue to Galactic Federation Gradient
CSS
background: linear-gradient(90deg, #040273 0%, #330077 100%);
From Deep Blue (#040273) to Galactic Federation (#330077). The two hues are 25° 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 | |
|---|---|---|---|---|---|
| Deep Blue | #040273 | 4, 2, 115 | 241°, 97%, 23% | 97, 98, 0, 55 | |
| 25% (near Insomniac Blue) | #100274 | 16, 2, 116 | 247°, 97%, 23% | 86, 98, 0, 55 | |
| 50% (near Child of the Night) | #1C0175 | 28, 1, 117 | 254°, 98%, 23% | 76, 99, 0, 54 | |
| 75% (near Child of the Night) | #270176 | 39, 1, 118 | 259°, 98%, 23% | 67, 99, 0, 54 | |
| Galactic Federation | #330077 | 51, 0, 119 | 266°, 100%, 23% | 57, 100, 0, 53 |
Halfway along, the gradient is #1C0175, closest to the named color Child of the Night. 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.12:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #040273, #330077) - Diagonal:
linear-gradient(135deg, #040273, #330077) - Radial, from the center out:
radial-gradient(circle, #040273, #330077) - Tailwind CSS:
bg-gradient-to-r from-[#040273] to-[#330077]
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 Deep Blue to Galactic Federation gradient?
It starts at #040273 (Deep Blue) and ends at #330077 (Galactic Federation), with #1C0175 in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #040273, #330077) runs from Galactic Federation on the left to Deep Blue on the right.