LEGO Gradient is a warm and bold 2-colour linear gradient that runs from yellow (#FFCF00) to red (#E3000B) at 135°. It is inspired by LEGO’s brand colours, a reference point for media interfaces. Black text reads best on it, at a contrast ratio of 6.7:1 against the gradient’s average colour (AA). Check every point, not just the average →
Unofficial reference: inspired by LEGO’s brand colours, which may differ from its official guidelines. The Gradients is not affiliated with or endorsed by LEGO. LEGO 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 LEGO’s. Terms
background: linear-gradient(135deg, #FFCF00, #E3000B);
bg-gradient-to-br from-[#FFCF00] to-[#E3000B]
{
"lego": {
"value": "linear-gradient(135deg, #FFCF00 0%, #E3000B 100%)",
"type": "color"
}
}
The same gradient, same direction, ready for your app or design system.
let legoGradient = LinearGradient(
colors: [
Color(red: 1, green: 0.812, blue: 0),
Color(red: 0.89, green: 0, blue: 0.043)
],
startPoint: UnitPoint(x: 0, y: 0),
endPoint: UnitPoint(x: 1, y: 1)
)
// Usage
Rectangle().fill(legoGradient)val legoColors = listOf(Color(0xFFFFCF00), Color(0xFFE3000B))
Modifier.drawBehind {
drawRect(
Brush.linearGradient(
colors = legoColors,
start = Offset(size.width * 0f, size.height * 0f),
end = Offset(size.width * 1f, size.height * 1f)
)
)
}<!-- res/drawable/lego_gradient.xml -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="315"
android:startColor="#FFCF00"
android:endColor="#E3000B"
android:type="linear" />
</shape>const legoGradient = LinearGradient(
begin: Alignment(-1, -1),
end: Alignment(1, 1),
colors: [Color(0xFFFFCF00), Color(0xFFE3000B)],
);
// Usage
Container(decoration: const BoxDecoration(gradient: legoGradient))import { LinearGradient } from 'expo-linear-gradient';
<LinearGradient
colors={['#FFCF00', '#E3000B']}
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="lego" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#FFCF00" />
<stop offset="100%" stop-color="#E3000B" />
</linearGradient>
</defs>
<rect width="100%" height="100%" fill="url(#lego)" />
</svg>:root {
--lego-1: #FFCF00;
--lego-2: #E3000B;
--lego-angle: 135deg;
--lego: linear-gradient(var(--lego-angle), var(--lego-1), var(--lego-2));
}
.hero {
background: var(--lego);
}$lego-1: #FFCF00;
$lego-2: #E3000B;
$lego: linear-gradient(135deg, $lego-1, $lego-2);
@mixin lego-bg {
background: $lego-1;
background: $lego;
}| Stop | Name | HEX | RGB | HSL |
|---|---|---|---|---|
| 1 | Yellow | #FFCF00 | rgb(255, 207, 0) | hsl(49, 100%, 50%) |
| 2 | Red | #E3000B | rgb(227, 0, 11) | hsl(357, 100%, 45%) |
Free PNG wallpapers and backgrounds, drawn in your browser at full resolution.
The LEGO Gradient uses 2 colours: #FFCF00 and #E3000B, at an angle of 135°.
Paste background: linear-gradient(135deg, #FFCF00, #E3000B); into any element’s styles. For Tailwind, use the class list in the Tailwind block above.
Black text has the best contrast, at 6.7:1 against the gradient’s average colour, which is AA. Check the lightest and darkest ends too if text spans the whole gradient.