← All gradients
35%How it works
Railway ↗

Railway Gradient

#0B0D0E
#7B2FBE
Text readability
Brand DarkBold Tech

Railway Gradient is a dark and bold 2-colour linear gradient that runs from near-black (#0B0D0E) to purple (#7B2FBE) at 135°. It is inspired by Railway’s brand colours, a reference point for tech interfaces. White text reads best on it, at a contrast ratio of 13.0:1 against the gradient’s average colour (AAA). Check every point, not just the average →

Unofficial reference: inspired by Railway’s brand colours, which may differ from its official guidelines. The Gradients is not affiliated with or endorsed by Railway. Railway is a trademark of its owner. The CSS is free to use, but don’t use these colours to make your own product look like Railway’s. Terms

CSS
background: linear-gradient(135deg, #0B0D0E, #7B2FBE);
Tailwind
bg-gradient-to-br from-[#0B0D0E] to-[#7B2FBE]
Figma token
{
    "railway": {
        "value": "linear-gradient(135deg, #0B0D0E 0%, #7B2FBE 100%)",
        "type": "color"
    }
}

Railway Gradient for SwiftUI, Flutter, Android and more

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

let railwayGradient = LinearGradient(
    colors: [
        Color(red: 0.043, green: 0.051, blue: 0.055),
        Color(red: 0.482, green: 0.184, blue: 0.745)
    ],
    startPoint: UnitPoint(x: 0, y: 0),
    endPoint: UnitPoint(x: 1, y: 1)
)

// Usage
Rectangle().fill(railwayGradient)

Colours in the Railway Gradient

StopNameHEXRGBHSL
1Near-black#0B0D0Ergb(11, 13, 14)hsl(200, 12%, 5%)
2Purple#7B2FBErgb(123, 47, 190)hsl(272, 60%, 46%)

Railway Gradient in use

Build something beautifulA hero section on the Railway GradientGet started
Button
Card accentAs a border or progress bar
Gradient text

Railway 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 Railway Gradient?

The Railway Gradient uses 2 colours: #0B0D0E and #7B2FBE, at an angle of 135°.

How do I use the Railway Gradient in CSS?

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

What text colour works on the Railway Gradient?

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