Tempest in a Teapot to Midnight Masquerade Gradient
CSS
background: linear-gradient(90deg, #303a40 0%, #2c2e47 100%);
From Tempest in a Teapot (#303A40) to Midnight Masquerade (#2C2E47). The two hues are 33° 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 | |
|---|---|---|---|---|---|
| Tempest in a Teapot | #303A40 | 48, 58, 64 | 203°, 14%, 22% | 25, 9, 0, 75 | |
| 25% (near Total Eclipse) | #2F3742 | 47, 55, 66 | 215°, 17%, 22% | 29, 17, 0, 74 | |
| 50% (near Total Eclipse) | #2E3444 | 46, 52, 68 | 224°, 19%, 22% | 32, 24, 0, 73 | |
| 75% (near Midnight Masquerade) | #2D3145 | 45, 49, 69 | 230°, 21%, 22% | 35, 29, 0, 73 | |
| Midnight Masquerade | #2C2E47 | 44, 46, 71 | 236°, 23%, 23% | 38, 35, 0, 72 |
Halfway along, the gradient is #2E3444, closest to the named color Total Eclipse. 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.14:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #303a40, #2c2e47) - Diagonal:
linear-gradient(135deg, #303a40, #2c2e47) - Radial, from the center out:
radial-gradient(circle, #303a40, #2c2e47) - Tailwind CSS:
bg-gradient-to-r from-[#303a40] to-[#2c2e47]
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 Tempest in a Teapot to Midnight Masquerade gradient?
It starts at #303A40 (Tempest in a Teapot) and ends at #2C2E47 (Midnight Masquerade), with #2E3444 in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #303a40, #2c2e47) runs from Midnight Masquerade on the left to Tempest in a Teapot on the right.