Gradients by color
Jump to a ready-made gradient and copy the CSS in one click.
About
This free CSS gradient generator lets you design linear, radial, and conicgradients with a live preview. Adjust the angle, add or remove color stops, drag each stop's position, and pick the interpolation color space (sRGB or the smoother OKLCH / OKLab) - then copy production-ready CSS.
Beyond the standard background declaration, it exports a native Tailwind CSS v4 @theme block so you can reference the gradient as a design token. Your gradient is encoded into the page URL so you can bookmark or share the exact result.
100% client-side: everything runs locally in your browser - nothing is uploaded, and no gradient data ever touches a server.
Frequently Asked Questions
About the CSS Gradient Generator.
Yes. The CSS Gradient Generator is 100% free and runs entirely in your browser. There is no sign-up required and no server - your gradient is built with local JavaScript, so nothing you create is uploaded or stored anywhere.
You can create linear, radial, and conic gradients. Linear and conic gradients support an adjustable angle, while radial gradients spread outward from the center. Add, remove, reorder, and reposition as many color stops as you need.
Click "Copy @theme" to get a Tailwind v4 @theme block that registers the gradient as a custom property (--gradient-brand). You can then use it in your markup with an arbitrary value such as bg-(image:--gradient-brand). The "Copy CSS" button gives you the plain background declaration for any project.
Modern CSS lets gradients interpolate in different color spaces. The default (sRGB) matches legacy behavior, while OKLCH and OKLab produce smoother, more perceptually even color transitions with fewer muddy mid-tones. Choosing OKLCH outputs linear-gradient(in oklch, ...), supported in all current major browsers.
Yes. The full gradient state (type, angle, color space, and all stops) is encoded into the page URL as you edit, so you can bookmark it or paste the link to share the exact same gradient with anyone.
Linear, radial, and conic gradients are supported across all modern browsers. The "in <color-space>" interpolation syntax (e.g. oklch) is supported in current versions of Chrome, Edge, Safari, and Firefox; older browsers fall back gracefully to the default sRGB interpolation.
From the blog
Improving Core Web Vitals: Replacing Background Images with CSS Gradients
Decorative background images cause late-discovery network bottlenecks. Learn how replacing them with native CSS gradients reduces LCP delays to zero.
Read →tailwindThe Complete Guide to Tailwind CSS v4 Gradients
Tailwind CSS v4 introduces semantic upgrades to gradient classes and native OKLCH support. Learn how to use bg-linear and CSS-first theme configurations.
Read →cssThe Physics of Muddy Gradients: Bypassing the sRGB 'Dead Zone' with OKLCH
Learn why linear interpolation across sRGB color coordinates produces muddy gray gradients, and how perceptually uniform spaces like OKLCH fix it.
Read →