CSS Gradient Generator
Create stunning CSS gradients with real-time preview
Preview
Gradient Settings
Color Stops
CSS Code
background: #6366f1; background: -webkit-linear-gradient(135deg, #6366f1 0%, #ec4899 100%); background: -moz-linear-gradient(135deg, #6366f1 0%, #ec4899 100%); background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
Preset Gradients
About CSS Gradient Generator
CSS gradients allow you to display smooth transitions between two or more colors without using image files. They are generated by the browser, which means they scale perfectly on any screen and look great on retina displays.
Types of CSS Gradients
Linear Gradients transition colors along a straight line defined by an angle. They are the most commonly used gradient type for backgrounds, buttons, and hero sections.
Radial Gradients radiate from a center point outward in an elliptical or circular shape. They work well for spotlight effects, glows, and orb-like elements.
Conic Gradients transition colors around a center point, similar to a color wheel. They are often used for pie charts, color pickers, and decorative backgrounds.
How to Use This Tool
- Choose a gradient type: linear, radial, or conic.
- Adjust the direction angle using the slider or preset buttons.
- Add, remove, or reposition color stops to fine-tune your gradient.
- Click a preset to start from a beautiful template, then customize it.
- Use the Random Gradient button for instant inspiration.
- Copy the generated CSS code to use in your project.
- Preview your gradient in fullscreen to see how it looks at scale.
Browser Compatibility
CSS gradients are supported in all modern browsers. The generated code includes vendor prefixes for -webkit- and -moz- to ensure maximum compatibility, along with a solid color fallback for older browsers.
Tips for Better Gradients
Use analogous colors (colors next to each other on the color wheel) for smooth, natural-looking gradients. Complementary colors create bold, vibrant contrasts. Adding a mid-point color stop can help smooth out transitions. For backgrounds, subtle gradients with a slight angle (like 135 degrees) tend to look the most polished and professional.