CSS Gradient Generator
Build beautiful linear, radial, and conic gradients with live preview. Powered by chroma.js for perfectly smooth color scales.
Color Stops
Smooth Scale Generator
Use chroma.js color math to automatically generate a perfectly smooth gradient between your first and last color stops.
CSS Output
Free CSS Gradient Generator
Gradients are an essential part of modern web design, adding depth, branding, and visual interest to buttons, backgrounds, and text. Writing complex gradient syntax by hand can be tedious and error-prone. The OmniWebKit CSS Gradient Generator provides a visual, real-time playground to build the perfect gradient and instantly copy the production-ready CSS code.
Our generator supports full customization of Linear, Radial, and Conic gradients. You have complete control over the angle, focal points, and unlimited color stops. Best of all, everything runs instantly in your browser without requiring a server upload.
Powered by Chroma.js
One of the hardest parts of creating a beautiful gradient is avoiding "dead zones"—muddy, greyish transitions that happen when the browser interpolates between two clashing colors using standard RGB math.
To solve this, we've integrated the Smooth Scale Generator powered by chroma-js. By selecting a start and end color, our engine can automatically calculate and insert perfectly spaced color stops using advanced perceptual color spaces like LCH (Lightness, Chroma, Hue). This ensures incredibly smooth, vibrant transitions that standard CSS simply cannot achieve on its own.
Related Tools You Might Like
JSON Formatter
Format, validate, and minify JSON data
HTML Minifier
Minify HTML code for better performance
Color Picker
Pick colors and generate beautiful color palettes
Website Content Extractor
Extract structured content, meta tags, and SEO data from any website
Google Dork Generator
Build advanced search operator queries without memorising the syntax
Google Search Operators
Every search operator, tagged with whether Google still supports it
How linear gradient css syntax is put together
A gradient takes a direction and a list of colour stops. Everything else is detail.
The direction comes first, as an angle or a keyword like `to right`. Then each colour, optionally with a position. Omit positions and the browser spaces the stops evenly.
The angle convention is the part that trips everyone. CSS measures clockwise from pointing up, so 0deg runs upward and 90deg runs rightward. If your gradient looks rotated a quarter turn from what you intended, that is why.
Avoiding the grey dead zone in a multi stop gradient
Blend two colours from opposite sides of the colour wheel and the middle turns muddy. This is the most common complaint about CSS gradients.
The cause is the interpolation path. By default the browser moves in a straight line through the sRGB cube, and the straight line between two opposite hues passes close to the centre, where saturation is lowest.
Two fixes. Add an intermediate stop in the hue you want the transition to pass through, which gives you explicit control. Or interpolate in a perceptual colour space such as Oklch, where the path stays saturated — with the caveat that support is newer, so check your browser targets.
Why a gradient background css fade shows visible stripes
Banding is a precision problem rather than a rendering bug.
Standard displays handle 256 levels per channel. A gradient fading between two similar colours across a wide area may only have a handful of distinct values to work with, so each one covers many pixels and reads as a stripe.
Counter-intuitively, the fix is to add noise. A faint semi-transparent noise texture over the gradient breaks the boundaries up, and the eye reads the result as smooth. Making the gradient steeper or narrower also helps, by spreading fewer pixels over each colour step.
Keeping text readable over a colour transition
Contrast is a single number against a flat colour and a range against a gradient, which is where accessibility checks quietly fail.
Text crossing a gradient has a different contrast ratio at every point. Checking against the average, or against the colour under the first letter, passes a test the finished page fails.
Test against the worst point the text actually crosses. Where that cannot pass, the practical answers are a semi-transparent overlay behind the text, a solid panel, or confining the gradient to an area with no text over it.
How to use the CSS Gradient Generator
- Pick a gradient type: linear for an axis, radial for a point, conic for a sweep.
- Add colour stops, and place one at the midpoint if the blend passes through grey.
- Set the angle, remembering CSS measures clockwise from upward.
- Check text contrast against the lightest and darkest parts, not the average.
- Copy the CSS and paste it into your stylesheet.
What this tool handles
All three gradient types
Linear, radial and conic, with the syntax differences handled for you.
Multiple colour stops
Add stops anywhere, including two at one position for a hard edge.
Copyable CSS
Standard property output, ready to paste with no vendor prefixes needed.
Runs in the browser
No request made at any point; it is string building.
