CSS Gradient Generator
Design a linear, radial or conic gradient with as many color stops as you like, then copy the CSS.
Presets
Color stops
CSS
Key facts
- Last updated
How to create a CSS gradient
Choose linear, radial or conic, set the angle or center, and adjust the color stops. Drag a stop’s slider to move it, add stops for multi-color blends, or start from a preset. Copy the CSS and paste it into any element’s style.
Tip: “Smoother colors” blends in the OKLCH color space, which avoids the muddy middle you get when mixing complementary colors like blue and yellow.
Frequently asked questions
Do CSS gradients work in all browsers?
Yes. Linear, radial and conic gradients work in every modern browser without prefixes.
How do I make smooth gradients without grey bands?
Mixing two very different hues in sRGB can pass through grey. Add a middle stop, or use the “Smoother colors (OKLCH)” option, which interpolates in a perceptual color space.
Can I use a gradient for text?
Yes: set the gradient as background, then add background-clip: text and color: transparent to the text element.
What is the difference between linear, radial and conic gradients?
A linear gradient changes color along a straight line at an angle you choose. A radial gradient spreads out from a center point in a circle or ellipse. A conic gradient sweeps around a center point, like a color wheel or pie chart.
Are CSS gradients better than gradient images?
Usually. CSS gradients are sharp at any screen size, add no download, and are easy to change. Use an image only for effects CSS can’t create, such as textures.
Sources
The rules and figures this tool uses come from:
Related tools
- Color Picker & ConverterHEX, RGB, HSL, CMYK and OKLCH
- Contrast CheckerWCAG AA/AAA contrast ratios with fixes
- Box Shadow GeneratorLayered CSS shadows with live preview
- Favicon Generatorfavicon.ico and app icons from an image or text
- Word CounterWords, characters, sentences and reading time
- Invoice GeneratorMake a professional invoice and download it as a PDF
- Mortgage CalculatorMonthly payment with taxes, insurance and PMI
- UK Invoice TemplateVAT and sole trader invoices that meet HMRC rules