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
background: linear-gradient(135deg, #0B0D0E, #7B2FBE);
bg-gradient-to-br from-[#0B0D0E] to-[#7B2FBE]
{
"railway": {
"value": "linear-gradient(135deg, #0B0D0E 0%, #7B2FBE 100%)",
"type": "color"
}
}
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)val railwayColors = listOf(Color(0xFF0B0D0E), Color(0xFF7B2FBE))
Modifier.drawBehind {
drawRect(
Brush.linearGradient(
colors = railwayColors,
start = Offset(size.width * 0f, size.height * 0f),
end = Offset(size.width * 1f, size.height * 1f)
)
)
}<!-- res/drawable/railway_gradient.xml -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="315"
android:startColor="#0B0D0E"
android:endColor="#7B2FBE"
android:type="linear" />
</shape>const railwayGradient = LinearGradient(
begin: Alignment(-1, -1),
end: Alignment(1, 1),
colors: [Color(0xFF0B0D0E), Color(0xFF7B2FBE)],
);
// Usage
Container(decoration: const BoxDecoration(gradient: railwayGradient))import { LinearGradient } from 'expo-linear-gradient';
<LinearGradient
colors={['#0B0D0E', '#7B2FBE']}
start={{ x: 0, y: 0 }}
end={{ x: 1, y: 1 }}
style={{ flex: 1 }}
/><svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630">
<defs>
<linearGradient id="railway" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#0B0D0E" />
<stop offset="100%" stop-color="#7B2FBE" />
</linearGradient>
</defs>
<rect width="100%" height="100%" fill="url(#railway)" />
</svg>:root {
--railway-1: #0B0D0E;
--railway-2: #7B2FBE;
--railway-angle: 135deg;
--railway: linear-gradient(var(--railway-angle), var(--railway-1), var(--railway-2));
}
.hero {
background: var(--railway);
}$railway-1: #0B0D0E;
$railway-2: #7B2FBE;
$railway: linear-gradient(135deg, $railway-1, $railway-2);
@mixin railway-bg {
background: $railway-1;
background: $railway;
}| Stop | Name | HEX | RGB | HSL |
|---|---|---|---|---|
| 1 | Near-black | #0B0D0E | rgb(11, 13, 14) | hsl(200, 12%, 5%) |
| 2 | Purple | #7B2FBE | rgb(123, 47, 190) | hsl(272, 60%, 46%) |
Free PNG wallpapers and backgrounds, drawn in your browser at full resolution.
The Railway Gradient uses 2 colours: #0B0D0E and #7B2FBE, at an angle of 135°.
Paste background: linear-gradient(135deg, #0B0D0E, #7B2FBE); into any element’s styles. For Tailwind, use the class list in the Tailwind block above.
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.