CSS Gradient Generator

Create beautiful CSS linear and radial gradients with an interactive color stop editor.

CSS Code
background: linear-gradient(90deg, #38ef7d 0%, #11998e 100%);

Colors

0%
100%

Popular Presets

fact_check Reviewed by Senior Editor
verified Reviewed: Jul 28, 2026
update Updated: Jul 28, 2026
commit v2.0.0
schedule 5 min read

lightbulb When to use this tool

  • check_circle Designing a gradient background for a hero section, card, button, or navigation bar without switching between design tools and a code editor.
  • check_circle Reproducing a gradient from a design file (Figma, Adobe XD) as CSS code by visually matching colours and direction.
  • check_circle Creating a smooth multi-stop gradient for text fill effects (combined with background-clip: text in CSS).
  • check_circle Generating a radial gradient for circular spotlight effects or glowing button hover states.
  • check_circle Experimenting with conic gradients for pie-chart-style decorative elements or angle-based colour transitions.

Why use our tool?

Visual Gradient Builder — Click, Drag, and Pick

Linear, Radial, and Conic Gradient Types

Production-Ready CSS Output

Gradient Presets for Quick Starting Points

Transparency / Alpha Stop Support

How it works

1

Select the gradient type: Linear, Radial, or Conic.

2

For linear gradients, set the angle using the angle input or click a directional preset button.

3

Click the gradient preview bar to add colour stops at your desired positions.

4

Click any colour stop to open the colour picker — enter a hex code, use RGB sliders, or use the visual picker.

5

Drag colour stops left or right to adjust their position percentages.

6

Copy the generated CSS from the output panel and paste into your stylesheet.

Examples

science Hero Section Background Gradient

science Image Overlay for Text Readability

Frequently Asked Questions

Do I need vendor prefixes for CSS gradients? expand_more
No — for all modern browser targets. The standard CSS3 gradient syntax (linear-gradient(), radial-gradient()) without vendor prefixes is supported in Chrome, Firefox, Safari (since version 7), Edge, and all modern mobile browsers. Vendor-prefixed versions (-webkit-linear-gradient, -moz-linear-gradient) were required for browser versions from 2011–2013, which are now an effectively negligible fraction of global traffic. The tool generates unprefixed standard CSS — if you specifically need to support very old browsers, you can add the prefixed versions manually.
What is the difference between linear, radial, and conic gradients? expand_more
A linear gradient transitions colours along a straight line at a specified angle (e.g. left to right, top to bottom, or any diagonal). A radial gradient emanates from a central point outward in an oval or circle shape — useful for spotlight effects and radial glows. A conic gradient transitions colours around a centre point like a colour wheel or pie chart — the colour stops are positioned by angle (0deg to 360deg) rather than linear position. All three are standard CSS and supported in modern browsers.
How do I create a gradient that fades to transparent? expand_more
In the colour picker, set the alpha channel of the target colour stop to 0 (fully transparent). For example, a gradient from #333333 at full opacity to transparent creates a dark-to-clear fade. In CSS, this is represented as: linear-gradient(to bottom, #333333 0%, rgba(51, 51, 51, 0) 100%) or using the transparent keyword: linear-gradient(to bottom, #333333, transparent). Use rgba() or hsla() colour notation when alpha values are involved — the transparent keyword is equivalent to rgba(0,0,0,0) which technically is transparent black and may cause colour banding in some cases.
Can I use a CSS gradient as a text fill? expand_more
Yes, with a CSS combination: set background-image to your gradient, background-clip: text, and color: transparent. This clips the gradient to the shape of the text characters, creating a gradient-filled text effect. Example: .gradient-text { background-image: linear-gradient(90deg, #ff6b6b, #4ecdc4); background-clip: text; -webkit-background-clip: text; color: transparent; }. Note: -webkit-background-clip: text is still needed for Safari support.
How do I reproduce a gradient from a Figma or Adobe XD design? expand_more
In Figma: click the layer with the gradient fill, open the Fill panel, note the colour stops (hex values and positions), the type (linear/radial), and the angle. Enter these same values in the generator. In Adobe XD: select the gradient fill layer, the Properties panel shows gradient type, colours, and direction. For linear gradients, Figma measures angle from the horizontal (same as CSS deg notation), so the values should transfer directly. For slight discrepancies in angles, Figma's 'to top' is 0° CSS equivalent (or 360°), while CSS 0deg points upward by default.

More UI & Design Tools