LeetCode Gradient is a cool 3-colour linear gradient that runs from orange (#FFA116) through grey (#B3B3B3) to near-black (#1A1A1A) at 135°. It is inspired by LeetCode’s brand colours, a reference point for tech interfaces. Black text reads best on it, at a contrast ratio of 5.2:1 against the gradient’s average colour (AA). Check every point, not just the average →
Unofficial reference: inspired by LeetCode’s brand colours, which may differ from its official guidelines. The Gradients is not affiliated with or endorsed by LeetCode. LeetCode 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 LeetCode’s. Terms
background: linear-gradient(135deg, #FFA116, #B3B3B3, #1A1A1A);
bg-gradient-to-br from-[#FFA116] via-[#B3B3B3] to-[#1A1A1A]
{
"leetcode": {
"value": "linear-gradient(135deg, #FFA116 0%, #B3B3B3 50%, #1A1A1A 100%)",
"type": "color"
}
}
The same gradient, same direction, ready for your app or design system.
let leetcodeGradient = LinearGradient(
colors: [
Color(red: 1, green: 0.631, blue: 0.086),
Color(red: 0.702, green: 0.702, blue: 0.702),
Color(red: 0.102, green: 0.102, blue: 0.102)
],
startPoint: UnitPoint(x: 0, y: 0),
endPoint: UnitPoint(x: 1, y: 1)
)
// Usage
Rectangle().fill(leetcodeGradient)val leetcodeColors = listOf(Color(0xFFFFA116), Color(0xFFB3B3B3), Color(0xFF1A1A1A))
Modifier.drawBehind {
drawRect(
Brush.linearGradient(
colors = leetcodeColors,
start = Offset(size.width * 0f, size.height * 0f),
end = Offset(size.width * 1f, size.height * 1f)
)
)
}<!-- res/drawable/leetcode_gradient.xml -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="315"
android:startColor="#FFA116"
android:centerColor="#B3B3B3"
android:endColor="#1A1A1A"
android:type="linear" />
</shape>const leetcodeGradient = LinearGradient(
begin: Alignment(-1, -1),
end: Alignment(1, 1),
colors: [Color(0xFFFFA116), Color(0xFFB3B3B3), Color(0xFF1A1A1A)],
);
// Usage
Container(decoration: const BoxDecoration(gradient: leetcodeGradient))import { LinearGradient } from 'expo-linear-gradient';
<LinearGradient
colors={['#FFA116', '#B3B3B3', '#1A1A1A']}
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="leetcode" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#FFA116" />
<stop offset="50%" stop-color="#B3B3B3" />
<stop offset="100%" stop-color="#1A1A1A" />
</linearGradient>
</defs>
<rect width="100%" height="100%" fill="url(#leetcode)" />
</svg>:root {
--leetcode-1: #FFA116;
--leetcode-2: #B3B3B3;
--leetcode-3: #1A1A1A;
--leetcode-angle: 135deg;
--leetcode: linear-gradient(var(--leetcode-angle), var(--leetcode-1), var(--leetcode-2), var(--leetcode-3));
}
.hero {
background: var(--leetcode);
}$leetcode-1: #FFA116;
$leetcode-2: #B3B3B3;
$leetcode-3: #1A1A1A;
$leetcode: linear-gradient(135deg, $leetcode-1, $leetcode-2, $leetcode-3);
@mixin leetcode-bg {
background: $leetcode-1;
background: $leetcode;
}| Stop | Name | HEX | RGB | HSL |
|---|---|---|---|---|
| 1 | Orange | #FFA116 | rgb(255, 161, 22) | hsl(36, 100%, 54%) |
| 2 | Grey | #B3B3B3 | rgb(179, 179, 179) | hsl(0, 0%, 70%) |
| 3 | Near-black | #1A1A1A | rgb(26, 26, 26) | hsl(0, 0%, 10%) |
Free PNG wallpapers and backgrounds, drawn in your browser at full resolution.
The LeetCode Gradient uses 3 colours: #FFA116, #B3B3B3 and #1A1A1A, at an angle of 135°.
Paste background: linear-gradient(135deg, #FFA116, #B3B3B3, #1A1A1A); into any element’s styles. For Tailwind, use the class list in the Tailwind block above.
Black text has the best contrast, at 5.2:1 against the gradient’s average colour, which is AA. Check the lightest and darkest ends too if text spans the whole gradient.