Dark Knight to Midnight Monarch Gradient
CSS
background: linear-gradient(90deg, #151931 0%, #1c0f33 100%);
From Dark Knight (#151931) to Midnight Monarch (#1C0F33). 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 | |
|---|---|---|---|---|---|
| Dark Knight | #151931 | 21, 25, 49 | 231°, 40%, 14% | 57, 49, 0, 81 | |
| 25% (near Dark Knight) | #171732 | 23, 23, 50 | 240°, 37%, 14% | 54, 54, 0, 80 | |
| 50% (near Midnight Monarch) | #191432 | 25, 20, 50 | 250°, 43%, 14% | 50, 60, 0, 80 | |
| 75% (near Midnight Monarch) | #1A1233 | 26, 18, 51 | 255°, 48%, 14% | 49, 65, 0, 80 | |
| Midnight Monarch | #1C0F33 | 28, 15, 51 | 262°, 55%, 13% | 45, 71, 0, 80 |
Halfway along, the gradient is #191432, closest to the named color Midnight Monarch. 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.04:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #151931, #1c0f33) - Diagonal:
linear-gradient(135deg, #151931, #1c0f33) - Radial, from the center out:
radial-gradient(circle, #151931, #1c0f33) - Tailwind CSS:
bg-gradient-to-r from-[#151931] to-[#1c0f33]
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 Dark Knight to Midnight Monarch gradient?
It starts at #151931 (Dark Knight) and ends at #1C0F33 (Midnight Monarch), with #191432 in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #151931, #1c0f33) runs from Midnight Monarch on the left to Dark Knight on the right.