Gradient Generator
Build linear and radial CSS gradients with live preview and copy-ready code.
About the Gradient Generator
Build linear and radial CSS gradients with live preview and copy-ready code. Every value is computed locally with vanilla JavaScript — there is no server round-trip, no sign-up and no limit on how many times you use it.
How to use
Pick two colors
Choose the start and end colors of your gradient.
Choose the type
Switch between linear and radial styles.
Set the angle
Use the angle slider to aim a linear gradient.
Copy the CSS
Grab the ready-to-paste background property.
Benefits
Production-ready CSS
Copy a valid background value straight into your stylesheet.
See it live
The preview updates as you change colors, type and angle.
No guesswork
Get the exact syntax without memorizing it.
Features & supported formats
Features
- Linear and radial modes
- Adjustable angle
- Two color stops
- Live gradient preview
- Copy-ready CSS output
Supported formats
Accuracy & limitations
The CSS produced here is standard and portable; the things worth knowing are how older browsers handle it and why long gradients sometimes band or dull in the middle.
- The generated CSS is standard and works in all current browsers. Older browsers without gradient support need a solid background-color fallback, which you should add yourself.
- Interpolation runs in sRGB by default, so gradients between distant hues can pass through a dull midpoint. Adding an intermediate stop by hand fixes it.
- Large, subtle gradients can show visible banding on 8-bit displays. That is a display limitation rather than a fault in the CSS.
- The preview reflects your browser. Rendering can differ slightly across engines and devices.
Frequently asked questions
Can I use these gradients in CSS?
Yes. Copy the generated background property and paste it directly into your stylesheet.
What is the difference between linear and radial?
Linear gradients blend along a straight line at a set angle; radial gradients blend outward from a centre point.
How do I change the direction?
Use the angle slider for linear gradients; 0 degrees points up and values increase clockwise.
Can I add more color stops?
This generator uses two stops for clean two-color blends; you can extend the copied CSS by hand for more.
Do gradients affect performance?
CSS gradients are rendered by the browser and are very efficient, far lighter than gradient images.
Further reading
Color in CSS
Every way CSS lets you write a color, when custom properties beat hard-coded values, and what the newer color functions change.
PalettesColor Harmony
The classic harmony schemes as hue arithmetic, what each one feels like in a real interface, and how to keep a palette from falling apart.