CSS Gradient Generator (linear and radial)

Edit the color stops and angle of a linear or radial gradient, watch the live preview and copy the CSS background code.

  • Runs in your browser (no upload)
Gradient type

0deg runs from bottom to top, 90deg from left to right and 180deg from top to bottom (0–360).

Color stops

Use 2 to 10 stops. The CSS lists them in order of position.

  1. Stop 1

  2. Stop 2

  3. Stop 3

Result

Preview

Generated CSS

background: #4158d0;
background: linear-gradient(90deg, #4158d0 0%, #c850c0 46%, #ffcc70 100%);

How to use

  1. Choose linear or radial, then set the angle, or the shape and center position.
  2. Edit each color stop (#RRGGBB etc.) and its position (0–100%). Use "Add a color stop" to add more and × to remove one.
  3. Check the preview and press "Copy CSS" to paste the generated CSS into your stylesheet.

FAQ

Which way do 0deg and 90deg point?

In CSS linear-gradient, 0deg runs from bottom to top (to top), 90deg from left to right (to right) and 180deg from top to bottom (to bottom).

What happens if two stops share a position?

The colors switch sharply at that point instead of blending, which is useful for stripes.

Why are there two background lines?

The first line is a solid fallback color, so the first color still shows where gradients are not supported.

Can I use color names such as red, or rgb()?

For safety only hex colors (#RGB, #RGBA, #RRGGBB, #RRGGBBAA) are accepted, and no other text is ever written into the CSS.

Notes & limitations

  • What you enter is processed only on this page and is not sent to YUCTS servers.
  • Only hex colors are supported. Color names, rgb(), hsl() and keywords such as transparent cannot be used (for transparency, use the last two digits of #RRGGBBAA).
  • Conic and repeating gradients and color interpolation options are not supported.
  • The preview shows how your browser renders the gradient. Older browsers may not display 8-digit (#RRGGBBAA) colors.