Dark to Dark Knight Gradient
CSS
background: linear-gradient(90deg, #1b2431 0%, #151931 100%);
From Dark (#1B2431) to Dark Knight (#151931). The two hues are 16° 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 | |
|---|---|---|---|---|---|
| Dark | #1B2431 | 27, 36, 49 | 215°, 29%, 15% | 45, 27, 0, 81 | |
| 25% (near Dark) | #1A2131 | 26, 33, 49 | 222°, 31%, 15% | 47, 33, 0, 81 | |
| 50% (near Sombre Night) | #181F31 | 24, 31, 49 | 223°, 34%, 14% | 51, 37, 0, 81 | |
| 75% (near Dark Knight) | #171C31 | 23, 28, 49 | 228°, 36%, 14% | 53, 43, 0, 81 | |
| Dark Knight | #151931 | 21, 25, 49 | 231°, 40%, 14% | 57, 49, 0, 81 |
Halfway along, the gradient is #181F31, closest to the named color Sombre 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.11:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #1b2431, #151931) - Diagonal:
linear-gradient(135deg, #1b2431, #151931) - Radial, from the center out:
radial-gradient(circle, #1b2431, #151931) - Tailwind CSS:
bg-gradient-to-r from-[#1b2431] to-[#151931]
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 Dark to Dark Knight gradient?
It starts at #1B2431 (Dark) and ends at #151931 (Dark Knight), with #181F31 in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #1b2431, #151931) runs from Dark Knight on the left to Dark on the right.