CSS Gradient Generator
Create linear and radial CSS gradients with live preview and one-click copy.
About CSS Gradients
CSS gradients let you display smooth transitions between two or more colors. They're rendered natively by the browser, meaning they scale perfectly to any resolution. Use them for backgrounds, buttons, text overlays, and decorative elements without loading a single image file. This CSS gradient generator gives you a live editor to build, preview, and export gradients in seconds — no design software required.
Linear vs Radial vs Conic
Linear gradients transition along a straight line at a specified angle. Radial gradients radiate outward from a center point in a circle or ellipse. Conic gradients rotate around a center point, creating pie-chart-like effects. All three support unlimited color stops.
Gradient Types Explained
Each gradient type serves a different visual purpose, and choosing the right one depends on the effect you're trying to achieve.
Linear gradients are the most common and versatile. By adjusting the angle control (0–360°), you can create horizontal fades, vertical transitions, or diagonally angled blends. Use a 90° angle for a left-to-right shift (e.g., sunsets across a horizon), 180° for top-to-bottom overlays, or 45° for energetic diagonal banners. Linear gradients shine in button backgrounds, hero section overlays, and subtle card dividers where a clean directional transition is desired.
Radial gradients spread outward from a central point in either a circle or an ellipse. Circular radial gradients are ideal for spotlight effects, vignettes, and glowing buttons — anywhere you want colors to emanate from a single focal point. Elliptical shapes work well for uneven surfaces or mimicking natural lighting like a window cast on a wall. Use the Shape toggle in the editor to switch between circle and ellipse and see how the gradient changes in real time.
Conic gradients wrap color transitions around a center point like a color wheel. They're excellent for pie charts, gauge dials, loading spinners, and psychedelic background patterns. Unlike linear and radial gradients, conic gradients don't fade toward an edge — they loop back to the starting color, making them perfect for circular progress indicators and color-wheel visualizations.
Creating Multi-Stop Gradients
While a two-color gradient is simple and effective, adding more color stops unlocks dramatically richer visuals. Each stop consists of a color value and a position percentage (0–100%) that determines where that color sits along the gradient's transition path. By layering multiple stops at strategic positions, you can create rainbow bands, sunset streaks, metallic sheens, and complex brand-accurate color ramps.
Positioning is key to multi-stop control. Closely packed stops create sharp, distinct color bands — useful for striped backgrounds or segmented effects. Widely spaced stops produce slow, smooth blending between hues. For example, placing stops at 0%, 25%, 50%, 75%, and 100% with alternating warm and cool colors yields a balanced, evenly distributed rainbow. Tightening them to 0%, 35%, and 40% produces a hard edge followed by a soft fade — great for highlight accents or shadow transitions. The generator lets you add unlimited stops and individually tweak each position, so you can iterate until the blend looks exactly right.
Pair your gradients with complementary design elements using our Box Shadow & Border Radius tool to build polished UI components, or use the Color Palette Generator to find harmonious color schemes before applying them as gradient stops.