MUTools

Color & Design

CSS Gradient Generator

CSS Gradient Generator is a free tool that builds CSS gradient code from a visual editor — just set the colors, direction, and color stops. It supports all three gradient types, linear, radial, and conic, with a live preview, so you can quickly create gradients for website backgrounds, buttons, headings, and more.

Color stops (color anchor points)

Click the bar to add a color
Color
100%
0%

Gradient type

90°

Preview

CSS code

.gradient {
  background-image: linear-gradient(90deg, #6366F1 0%, #EC4899 100%);
}

Every gradient is generated entirely in your browser, and the values you enter are never sent to any server.

About CSS Gradient Generator

CSS Gradient Generator is a free tool that builds CSS gradient code from a visual editor — just set the colors, direction, and color stops. It supports all three gradient types, linear, radial, and conic, with a live preview, so you can quickly create gradients for website backgrounds, buttons, headings, and more.

Pick a type, then adjust the angle with a slider for linear and conic gradients, or set the shape (circle or ellipse) and center position for radial gradients. Add and remove colors freely as color stops, drag the handles along the bar to reposition them, and choose colors with the color picker or HEX input. Each stop also has an opacity (alpha) value, so you can create transparent gradients with rgba(). Hit "Randomize" to explore color ideas in seconds.

Copy the finished gradient with one click as CSS (background-image), CSS variables (:root { --gradient }), a Tailwind backgroundImage value, or SCSS variables, then paste it straight into your project. Press "Copy URL" to get a shareable link that reproduces the current gradient — handy for sharing with your team or bookmarking.

Every gradient is generated entirely in your browser, and the values you enter are never sent to any server. No account and no ad clicks required — just start creating.

How to use

  1. Click the color stop bar to add a color, then drag the handles to reposition them. Set each color with the color picker or HEX input and adjust opacity (alpha) with the slider. Hit "Randomize" to explore color ideas in seconds.
  2. Choose a gradient type (linear, radial, or conic). Adjust the angle with the slider for linear and conic gradients, or set the shape (circle or ellipse) and center position for radial gradients.
  3. Check the gradient in the live preview. Press "Copy URL" to get a shareable link that reproduces the current settings.
  4. Under "CSS code", switch between the CSS, CSS variables, Tailwind, and SCSS tabs, then use "Copy CSS code" to grab the code and paste it into your project.

Use cases

  • Designers and coders who want a gradient for a website or button background and need ready-to-paste CSS.
  • Front-end engineers trying out linear, radial, and conic gradients to settle on a design direction.
  • Developers who want to drop a gradient straight into code as CSS variables or a Tailwind config.
  • Anyone building image overlays or glass-style effects with gradients that include transparency.
  • Anyone who wants to hand a chosen gradient to their team via a share URL or reproduce the same settings later.

Notes

  • Every gradient is generated in your browser, and the values you enter are never sent anywhere.
  • Conic gradients (`conic-gradient`) may not render in some older browsers. Check support for your target environment.
  • You can add up to 8 color stops. A stop outputs `#RRGGBB` at 100% opacity and `rgba()` below 100%.
  • The share URL contains the type, angle, shape, center position, and each color stop (color, opacity, and position). Opening the URL reproduces the gradient with the same settings.

FAQ

Are the values I enter sent to a server?
No. Every gradient is generated entirely in your browser, so you can safely use it with brand colors or colors from your work.
What is the difference between linear, radial, and conic gradients?
A linear gradient (linear-gradient) shifts colors along a straight line and is the most common type, with the direction set by an angle. A radial gradient (radial-gradient) spreads outward from a center point as a circle or ellipse. A conic gradient (conic-gradient) rotates colors around a center point by angle, which suits pie-chart-like effects. The tool lets you switch between all three.
Can I export to CSS variables or Tailwind?
Yes. The "CSS code" tabs let you switch between CSS (background-image), CSS variables (the :root --gradient format), a Tailwind backgroundImage value, and SCSS variables. Use the "Copy CSS code" button to copy the full code and paste it straight into your project.
Can I create gradients with transparency (semi-opacity)?
Yes. You can set an opacity (alpha) value on each color stop, and stops below 100% are output in rgba() format. This lets you create transparent gradients for image overlays and similar effects.
Can I share or save the gradient I create?
Press "Copy URL" to get a share URL that includes the type, angle, color stops, and more. Opening that URL reproduces the same gradient, which is handy for sharing with your team or bookmarking.
How many colors can I use?
You can add up to 8 color stops, so you can build complex gradients with three or more colors. Clicking the bar adds a new stop with the color interpolated at that position.