Build linear and radial CSS gradients visually. Add color stops, adjust angles, and copy the ready-to-use CSS code instantly.
A CSS gradient is a smooth transition between two or more colors, defined entirely in CSS without needing image files. Gradients are widely used for backgrounds, buttons, and UI accents and are fully supported in all modern browsers.
CSS gradients are fully supported in all modern browsers including Chrome, Firefox, Safari, and Edge. No vendor prefixes are required for current browser versions, though adding -webkit- prefixes ensures compatibility with older WebKit-based browsers.
CSS supports four gradient functions. linear-gradient() transitions colors along a straight line at any angle — 0deg goes bottom to top, 90deg goes left to right, 135deg goes diagonal. radial-gradient() radiates outward from a center point in either a circular or elliptical shape. conic-gradient() rotates color stops around a center point like a pie chart and is excellent for color wheels and donut charts. repeating-linear-gradient() and repeating-radial-gradient() tile the pattern indefinitely, useful for striped backgrounds and checkerboard patterns. This generator covers the two most commonly used types: linear and radial.
Color stops define where each color begins and ends along the gradient. Without explicit positions, colors are distributed evenly — two colors at 0% and 100%, three colors at 0%, 50%, and 100%. You can override these positions to create asymmetric gradients, hard stops (by placing two different colors at the same position), and color bands. A hard stop like linear-gradient(red 50%, blue 50%) creates a sharp two-tone split with no transition at all. Moving a stop closer to one end compresses the transition on that side, making the gradient appear to "lean" toward a color.
Effective gradients tend to follow a few principles. Keep hues adjacent on the color wheel for harmonious transitions — jumping from red to green looks muddy in the middle because the transition passes through brownish tones. Adding a third color stop at the midpoint lets you control exactly what color appears there. For dark UI designs, subtle gradients from a slightly lighter shade to a darker shade of the same hue add depth without clashing with content. Avoid very high-contrast two-color gradients across large areas — they read as cheap in contemporary design. Instead, try a near-monochromatic gradient with a 15–30% lightness difference.
All modern browsers support CSS gradients without vendor prefixes. If you need to support very old WebKit browsers (Safari 5, Android 4.x), prepend -webkit- to the gradient function. For IE 9 compatibility you'll need a completely different syntax or a fallback solid background color. The generated CSS from this tool uses the unprefixed standard syntax, which works in Chrome 26+, Firefox 16+, Safari 6.1+, Edge, and all modern mobile browsers — covering effectively all current web traffic.