CSS Gradient Generator
Build linear, radial, conic, and repeating CSS gradients visually. Add color stops, pick presets, and copy the CSS instantly.
How to Use the CSS Gradient Generator
- Choose a gradient type — Linear for directional fades, Radial for circular bursts, Conic for color wheel effects, or Repeating for tiled patterns.
- Adjust the angle or position — for linear gradients, drag the angle slider. For radial, choose the shape and center position.
- Edit color stops — change the color using the color picker and drag the slider to set the stop position (0% to 100%). Click "+ Add Stop" to add more stops.
- Browse presets — click any swatch in the preset gallery to load a curated gradient instantly.
- Copy or download the CSS and paste it into your stylesheet as a
backgroundorbackground-imageproperty.
Understanding CSS Gradients
CSS gradients are images generated by the browser using mathematical color transitions. They can be used anywhere a CSS image is valid: as a background, a background-image, a border-image, or even a list-style-image. Because they are resolution-independent, they look sharp on every screen density — from standard monitors to 4K displays and Retina devices — without any extra files or image assets.
Linear Gradients
linear-gradient() creates a color transition along a straight line. The direction can be specified as a keyword (to right, to bottom right) or as a precise degree angle. Angles work like a clock: 0deg points up, 90deg points right, 180deg points down. The default direction when no angle is specified is to bottom (180deg). Linear gradients are the most common type, used for button backgrounds, section dividers, header banners, and card overlays.
Radial Gradients
radial-gradient() radiates colors outward from a center point. The shape can be a circle (equal radius in all directions) or an ellipse (different horizontal and vertical radii). The center position can be set using CSS position keywords or pixel/percentage values. Radial gradients are used for spotlight effects, vignettes, glowing button backgrounds, and circular badge designs.
Conic Gradients
conic-gradient() rotates colors around a center point like a color wheel or pie chart. Unlike radial gradients, the transition happens along the angular axis, not the radial axis. Conic gradients are commonly used for pie charts (using hard stops), color wheels for design tools, progress indicator backgrounds, and decorative patterns. They are also composable with radial-gradient() to create donut chart effects.
Repeating Gradients for Patterns
repeating-linear-gradient() and repeating-radial-gradient() tile the gradient pattern when the stops do not cover the full 0%–100% range. This makes them ideal for creating CSS-only patterns: diagonal stripes, checkerboards (by layering multiple gradients), and radiating rings. A striped background can be created with just two stops: repeating-linear-gradient(45deg, #000 0%, #000 10%, transparent 10%, transparent 20%).
Multiple Gradients and Layering
CSS background properties accept multiple values separated by commas. This means you can layer multiple gradients on top of each other. For example, combining a radial gradient spotlight with a linear gradient base, or overlaying diagonal stripe patterns. Transparency is key — gradients with transparent stops let lower layers show through. This technique produces complex backgrounds without any image files. For more CSS design tools, explore the Box Shadow Generator and CSS Grid Generator.