Tools › Build › CSS Gradient Generator
🌈

CSS Gradient Generator

Build linear, radial and conic gradients visually — with an angle dial, colour stops and opacity — then copy clean CSS, SCSS or Tailwind code.

🌈 Linear · Radial · Conic
🎚 Angle dial
🎨 12 presets
📋 CSS · SCSS · Tailwind
🌈

Gradient type

Linear, radial or conic.

Colour stops
Angle
°
✨

Presets

Click one to replace your colour stops.

</>

Code

Copy it straight into your stylesheet.


Advertisement

How to use

  1. Choose a gradient type: linear (straight), radial (from a centre point) or conic (sweeping around a point).
  2. Edit the colour stops: pick a colour, set its position (0–100%) and opacity. Add up to 10 stops, remove any beyond two, reverse the order, or try random colours.
  3. Set the angle by dragging the dial, using the slider or clicking an arrow. For radial and conic gradients, click the box to place the centre.
  4. Pick a preset if you want a ready-made colour combination to start from.
  5. Choose CSS, SCSS or Tailwind and press Copy to paste the code into your project.

Linear, radial and conic gradients

A linear gradient blends colours along a straight line at an angle: 0deg points up, 90deg to the right and 180deg down. A radial gradient spreads outward from a centre point as a circle or an ellipse, and its size keyword decides where the last colour ends. A conic gradient rotates colours around a centre, which is ideal for colour wheels, pie-style charts and shiny metallic effects.

Each colour stop has a position. Two stops at the same position make a hard edge instead of a smooth blend.

Tips for better gradients

Two or three stops with similar hues usually look smoother than many contrasting ones. Gradients between very different hues can look muddy in the middle; add a middle stop to control it. Use opacity on a stop to fade into whatever is behind the element, and keep enough contrast if you place text on top of a gradient.

Frequently asked questions

How do I create a CSS gradient?

Choose the type, set your colour stops and angle, then copy the generated background rule. For example background: linear-gradient(90deg, #fab60d 0%, #0a1626 100%); draws a left-to-right gradient.

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

Linear gradients change colour along a line, radial gradients spread from a centre point outward, and conic gradients sweep colours around a centre point like a clock face.

How do I make a gradient transparent?

Lower the opacity value of a stop. The tool outputs rgba() colours for stops below 100%, so a gradient can fade to transparent over an image or background.

How do I use the gradient in Tailwind CSS?

Select the Tailwind tab and copy the class, for example bg-[linear-gradient(90deg,#fab60d_0%,#0a1626_100%)]. It uses an arbitrary value, so it works without editing your config.

What do the angle values mean?

0° points to the top, 90° to the right, 180° to the bottom and 270° to the left. Conic gradients use the same angle as the starting point of the sweep.

Do CSS gradients work in all browsers?

Linear and radial gradients work in all modern browsers. Conic gradients are supported in current Chrome, Edge, Safari and Firefox. The CSS output also includes a plain colour fallback line for very old browsers.

Is this CSS gradient generator free?

Yes, it is free, needs no sign-up and runs entirely in your browser.