linear · radial · conic
CSS gradient generator
Build a gradient by dragging color stops along a bar, picking colors and setting the angle, and watch the preview update. Switch between linear, radial and conic gradients, start from a preset, and copy the ready-to-paste CSS.
Private: your files never leave your device.
Drag the stops on the bar, or click the bar to add one. Arrow keys move a selected stop.
Presets
CSS
background: linear-gradient(90deg, #ff7a18 0%, #af002d 50%, #319197 100%);
How was this tool?
How to use CSS gradient generator
Step 1: Choose linear, radial or conic and set the angle or shape.
Step 2: Drag stops on the bar (click it to add one) and pick their colors.
Step 3: Copy the CSS line into your stylesheet.
The three gradient types
- linear-gradient(90deg, …) blends along a straight line; 0deg goes bottom to top, 90deg left to right.
- radial-gradient(circle at center, …) spreads outwards from a point, as a circle or an ellipse that follows the box’s shape.
- conic-gradient(from 0deg at center, …) sweeps around a point like a clock hand, useful for pie charts and color wheels.
Each stop is a color and a position. Positions don’t have to be in order in the CSS, but the generator writes them sorted so the code is easy to read.
Frequently asked questions
Do CSS gradients work in all browsers?
Linear and radial gradients work in every current browser without prefixes; conic gradients work in all current browsers too.
How do I make a hard edge instead of a blend?
Put two stops at the same position with different colors, for example red 50% and blue 50%.
Can I use the gradient as a text color?
Yes: set it as the background, then add background-clip: text and color: transparent to the element.