NinjaFunction (Ninja Function) logo

CSS Gradient Generator

Create linear, radial and conic CSS gradients visually. Copy the CSS or download as PNG — free and 100% in your browser.


Preview

Gradient Settings

%
%

CSS Output

background: linear-gradient(135deg, #1C5C52 0%, #DFF3E5 100%);

Presets

About This Tool

NinjaFunction's CSS Gradient Generator lets you design linear, radial and conic gradients with multiple color stops and a live preview. Copy the ready-to-use CSS declaration, download the gradient as a PNG, or start from a preset. Everything runs locally — nothing is uploaded.

🎨 How to Use

  1. Pick a gradient type: linear, radial, or conic.
  2. Adjust the angle slider (linear and conic only).
  3. Add, remove, or edit color stops with the color picker.
  4. Set each stop's position from 0% to 100%.
  5. Click "Copy" to copy the CSS declaration.
  6. Or download the gradient as a PNG image.
  7. Try a preset or hit "Random" for inspiration.

💡 Pro Tips

  • ✔ Use HSL Not Hex – Switch to HSL color inputs when you want siblings of the same hue — just tweak the L value for tints and shades.
  • ✔ Pick the Right Type – Linear for banners and buttons, radial for spotlights and glows, conic for pie charts and color wheels.
  • ✔ Add a Third Stop – Two-color gradients often look flat. A midpoint stop lets you control where the transition happens.
  • ✔ Duplicate Stops for Hard Edges – Two stops at the same position (e.g. 50% and 50%) create a sharp line instead of a soft blend.
  • ✔ Copy CSS with One Click – Use the 📋 Copy button to grab the background: declaration ready to paste.
  • ✔ Works Offline – Once loaded, the generator runs entirely in your browser — no data is sent anywhere.

About CSS Gradients

CSS gradients let you create smooth transitions between two or more colors without any image files. They scale perfectly to any size, are GPU-accelerated, and are supported in every modern browser.

Linear Gradients

A linear gradient transitions colors along a straight line. You control the direction with an angle in degrees (0° = bottom to top, 90° = left to right).

Radial Gradients

A radial gradient transitions colors outward from a center point. You can control the shape (circle or ellipse) and size. Great for spotlight and glow effects.

Conic Gradients

A conic gradient sweeps colors around a center point like a pie chart. Useful for color wheels, progress indicators, and radial patterns.

Linear, Radial and Conic Gradients

TypeHow it looksGood for
LinearColours blend along a straight lineBackgrounds, buttons and banners
RadialColours spread out from a centre pointSpotlights, glows and soft shadows
ConicColours sweep around a centre like a clockPie charts and colour wheels

Tips for Gradients That Look Good

  • Use two or three colours that sit near each other on the colour wheel.
  • Add a slight angle, such as 135 degrees, for a more natural look than straight up and down.
  • Keep text readable. Check the contrast over the lightest and darkest parts of the gradient.
  • Use a darker or lighter shade of the same colour for a subtle effect.

Using the CSS

Copy the declaration and paste it as the background of any element, such as a section, a button or the body. Add a plain background colour just before it as a fallback for the rare browser that does not support gradients. Modern browsers all support linear and radial gradients, and conic gradients work in current versions of Chrome, Edge, Firefox and Safari.

FAQ

Are CSS gradients supported in all browsers?

Linear and radial gradients are universally supported. Conic gradients are supported in all modern browsers (Chrome 69+, Safari 12.1+, Firefox 83+).

Can I use the generated CSS commercially?

Yes — the generated CSS is yours. Gradients are simple CSS declarations, not copyrighted assets.

Is anything sent to a server?

No. Everything runs locally in your browser. Your colors, angle, and stops never leave your device.

What is the difference between linear, radial and conic gradients?

A linear gradient blends colours along a straight line at the angle you choose, such as 90deg for left to right. A radial gradient spreads out from a centre point in a circle or ellipse. A conic gradient sweeps the colours around a centre point like the hands of a clock, which is useful for pie-chart and colour-wheel effects.

How many colour stops can I use?

A gradient needs at least two stops, so the remove button is turned off when only two are left. You can add more stops to build multi-colour gradients, and move each one to set where its colour sits along the gradient.

Why does my gradient look striped or banded?

Banding shows up when two similar colours are stretched across a large area, especially dark blues and greys. Add a middle stop, choose colours that are a little further apart, or keep the gradient to a smaller element.

Always FreeAll tools are 100% free to use.
No Sign UpNo registration or login required.
Blazing FastInstant results, always.