background: linear-gradient(to right, #14b8a6, #3b82f6);Create beautiful CSS gradients with multiple colors. Supports linear and radial gradients with customizable direction.
What is CSS Gradient Generator?
CSS gradients create smooth color transitions without images. Linear gradients flow in a direction (horizontal, vertical, diagonal), while radial gradients radiate from a center point. Gradients work for backgrounds, buttons, headers, and decorative elements. This generator lets you design gradients visually, adding multiple color stops for complex transitions.
How to Use
- Choose gradient type: Linear or Radial
- For linear, select direction (right, left, top, diagonal)
- Add colors (minimum 2, maximum 5)
- Adjust colors using color picker or hex input
- Preview gradient in real-time
- Copy generated CSS to your stylesheet
Why Use This Tool?
Tips & Best Practices
- 2-3 colors create clean gradients
- Linear: 'to right' is most common
- Radial: good for buttons and spotlights
- Color stop order matters left-to-right
- Match brand colors for consistent design
- Test gradient on actual elements in your design
Frequently Asked Questions
What's the difference between linear and radial?
Linear gradients flow in a straight direction (horizontal, vertical, or diagonal). Radial gradients spread from a center point outward in a circular pattern. Linear suits backgrounds and headers; radial suits buttons, icons, and spotlight effects.
How many colors can I use?
2 to 5 color stops. Minimum 2 creates a basic gradient. 3-4 colors create complex transitions. More stops allow multi-color themes. CSS supports unlimited stops, but this tool limits to 5 for usability.
Can I set color stop positions?
This tool automatically distributes colors evenly. For custom positions, edit the CSS: add percentages after colors (e.g., #color1 0%, #color2 50%, #color3 100%). Positions control where each color starts in the gradient.
What directions are available?
Linear: to right, left, top, bottom, and four diagonals (top-right, top-left, bottom-right, bottom-left). Radial: circle from center. Use angles for custom directions: linear-gradient(45deg, ...)
How do I create transparent gradients?
Use RGBA colors or hex with alpha (#RRGGBBAA). Example: rgba(255,0,0,0.5) creates semi-transparent red. Transparent gradients overlay images or blend with backgrounds.
Do gradients work everywhere?
CSS gradients work in all modern browsers. Background property accepts gradients. You can also use gradients in border-image, mask-image, and list-style-image for creative effects.