CSS Gradient Generator
Build linear, radial and conic CSS gradients with a live preview and copy-ready code.
Loading CSS Gradient Generator… If nothing happens, please enable JavaScript.
Frequently asked questions
Is anything sent to a server when I build a gradient?
What is the difference between linear, radial, and conic gradients?
Do CSS gradients work in all browsers?
How do I make a gradient with a sharp edge instead of a smooth blend?
Can I use gradients as a border or text fill?
What is a colour stop and how many can I add?
How do I control the midpoint between two colour stops?
Can I layer multiple gradients over each other?
What was the old way to make gradients before CSS3?
How do I make a gradient that works as a loading spinner?
About CSS Gradient Generator
A CSS gradient is a function that generates a smooth transition between two or more colors, rendered entirely by the browser without any image file. There are three types: `linear-gradient()` transitions colors along a straight axis at any angle; `radial-gradient()` radiates outward from a center point in a circle or ellipse; and `conic-gradient()` sweeps colors around a center point like the face of a clock. All three are resolution-independent — they render crisp at any screen density, from standard HD displays to high-DPI Retina screens — and because they are computed on the GPU, they carry essentially zero performance cost compared to image backgrounds.
CSS gradients are used everywhere in modern web design. Subtle linear gradients add depth to hero sections, button states, and card backgrounds without the overhead of image assets. Radial gradients create spotlight effects, vignettes, and ambient glow around focal elements. Conic gradients underlie pie charts, loading spinners, and colour wheels built purely in CSS. Beyond aesthetics, gradients in CSS are versioned in source code alongside the markup they style, making them easier to maintain, update, and hand off than image files generated in design software.
This tool provides a live visual editor for all three gradient types. You add, remove, and reposition colour stops on an interactive track, adjust the angle or shape, and the CSS output updates in real time. The generated snippet is standard, vendor-prefix-free CSS3 that works in all modern browsers. It runs entirely client-side — no uploads, no accounts, no tracking. Changes exist only in your browser session and the final CSS you copy to your clipboard.
One important consideration is accessibility: gradients are decorative backgrounds and do not carry text alternatives, but they affect the contrast ratio of any text rendered on top of them. A gradient that starts light and ends dark can make text readable on one side of the element and illegible on the other. Always test your gradient backgrounds against your foreground text using a contrast checker. A practical technique is to add a semi-transparent dark overlay via an additional CSS layer — `linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4))` — to ensure consistent minimum contrast across the entire gradient area.
From 1990s Garish Rainbow Bars to GPU-Accelerated CSS: The Web Gradient Timeline
Web designers first got gradients in the late 1990s through GIF and PNG image slices — a single-pixel-wide image tile stretched horizontally, or a full-width image background. The technique was so common that it shaped an entire aesthetic: the deep blue-to-black gradient navigation bar became synonymous with early-2000s corporate web design. Creating or adjusting these gradients required Photoshop, a new export, and a server deployment — a workflow that could take hours for a colour change that might be rejected in review.
Vendor-prefixed CSS gradient syntax began appearing around 2008: `-webkit-gradient()` in Safari, with its own idiosyncratic syntax that bore little resemblance to what would become the standard. Firefox introduced `-moz-linear-gradient()` with a different syntax. Internet Explorer offered no gradient support until IE10, driving developers to use the proprietary `filter: progid:DXImageTransform.Microsoft.gradient()` syntax instead. For several years, achieving consistent cross-browser gradients required writing four separate declarations for the same effect — a maintenance nightmare that made CSS preprocessors and gradient-generation tools enormously popular.
The W3C standardised CSS gradients in the CSS Images Level 3 specification, with linear and radial gradients gaining universal prefix-free support by around 2013. Conic gradients — proposed by Lea Verou in a blog post in 2015 — were implemented in browsers between 2018 and 2020 after she shipped a polyfill that demonstrated the use cases. The progression from hacky image tiles to native GPU-rendered CSS primitives tracks the broader story of the web platform maturing from a document system into a full application runtime.