CSS Gradient Generator

Create linear and radial CSS gradients for backgrounds, buttons, and hero sections. Copy the code instantly.

Linear + radialLive previewCopy CSS
135deg
background: linear-gradient(135deg, #667eea, #764ba2);

Use the generated CSS

Choose two colors, then copy the background declaration into a CSS rule. For example, .banner { background: linear-gradient(135deg, #667eea, #764ba2); } creates a diagonal background. Linear gradients follow the angle; radial gradients spread outward from the center.

Check contrast and browser output

Preview text over both the lightest and darkest parts before publishing. A gradient that looks good without text can make labels hard to read. This tool exports CSS, not an image file. Test the declaration in your own page because element size changes how the transition appears. Use the Color Picker to inspect a source color or the Box Shadow Generator for a separate shadow effect.