Background Gradient Generator
Create beautiful CSS background gradients for web pages, apps and hero sections. Preview at full page size and copy the exact CSS you need.
Color Stops
Background CSS
background: linear-gradient(135deg, #155EEF 0%, #7C3AED 100%);
What Is a Background Gradient?
A background gradient is a smooth transition between colors applied to a page, section or element background. Unlike image backgrounds, CSS gradient backgrounds are lightweight, responsive, scalable and infinitely crisp on high-DPI screens. They are the modern standard for hero sections, section dividers and full-page backgrounds.
How to Use Background Gradients Effectively
- Use the full-page gradient sparingly: A gradient across the whole page can feel overwhelming. Better for hero sections or specific blocks.
- Pick colors carefully: Subtle gradients (close hue, close lightness) look sophisticated. High-contrast gradients are strong but rarely subtle.
- Add a solid base: Set a solid
background-colorfirst, then layer the gradient — provides a fallback for old browsers. - Consider fixed position:
background-attachment: fixedcreates a parallax feel but can hurt mobile performance. Use with care. - Test contrast: Text on gradient backgrounds needs to remain readable at every position of the gradient.
Best Practices for Hero Backgrounds
Hero gradients work best when they use color psychology matching the brand's tone — cool gradients feel professional, warm gradients feel energetic. Also add an overlay (a semi-transparent dark gradient) if text needs to stay readable across the full gradient. This pattern is used by Apple, Stripe, Linear and most modern SaaS brands.