← All gradients
35%How it works
Curated

Midnight City

#232526
#414345
Text readability
Curated DarkNeutral

Midnight City is a dark and neutral 2-colour linear gradient that runs from charcoal (#232526) to charcoal (#414345) at 135°. It suits dark-mode interfaces and footers and subtle surfaces and app backgrounds. White text reads best on it, at a contrast ratio of 12.5:1 against the gradient’s average colour (AAA). Check every point, not just the average →

CSS
background: linear-gradient(135deg, #232526, #414345);
Tailwind
bg-gradient-to-br from-[#232526] to-[#414345]
Figma token
{
    "midnight-city": {
        "value": "linear-gradient(135deg, #232526 0%, #414345 100%)",
        "type": "color"
    }
}

Midnight City gradient for SwiftUI, Flutter, Android and more

The same gradient, same direction, ready for your app or design system.

let midnightCityGradient = LinearGradient(
    colors: [
        Color(red: 0.137, green: 0.145, blue: 0.149),
        Color(red: 0.255, green: 0.263, blue: 0.271)
    ],
    startPoint: UnitPoint(x: 0, y: 0),
    endPoint: UnitPoint(x: 1, y: 1)
)

// Usage
Rectangle().fill(midnightCityGradient)

Colours in the Midnight City gradient

StopNameHEXRGBHSL
1Charcoal#232526rgb(35, 37, 38)hsl(200, 4%, 14%)
2Charcoal#414345rgb(65, 67, 69)hsl(210, 3%, 26%)

Midnight City gradient in use

Build something beautifulA hero section on the Midnight City gradientGet started
Button
Card accentAs a border or progress bar
Gradient text

Midnight City gradient variations

Reversed
Horizontal
Radial
Conic
Softer
Deeper
Smooth (OKLCH)
Hard stops

Download as an image

Free PNG wallpapers and backgrounds, drawn in your browser at full resolution.

Frequently asked questions

What are the hex codes for the Midnight City gradient?

The Midnight City gradient uses 2 colours: #232526 and #414345, at an angle of 135°.

How do I use the Midnight City gradient in CSS?

Paste background: linear-gradient(135deg, #232526, #414345); into any element’s styles. For Tailwind, use the class list in the Tailwind block above.

What text colour works on the Midnight City gradient?

White text has the best contrast, at 12.5:1 against the gradient’s average colour, which is AAA. Check the lightest and darkest ends too if text spans the whole gradient.