Skip to content

CSS Generator

CSS Gradient Generator

Create linear, radial, and conic gradients. Move color stops, adjust opacity, and copy the CSS. Generation runs in your browser in real time.

Generated CSS

Need a palette first? Start with the palette generator.

Build a CSS gradient for a real interface

Choose linear, radial, or conic, then adjust up to eight color stops. Each stop has a color, opacity, and position. The preview and copied rule come from the same settings; no image export or JavaScript library is needed to use the generated background.

Choose the direction your design needs

  • Linear: a transition along a straight axis. At 0° the direction is bottom to top; at 90° it is left to right. Try 135° for a diagonal card background.
  • Radial: a circle or ellipse expanding from the center. Use it for a spotlight behind a product. The angle setting does not apply to a radial gradient.
  • Conic: colors sweep around the center. The angle changes where the sweep starts. Useful for a decorative dial; a colored circle alone does not provide an accessible data chart.

Three examples in the Lienzo palette

These independent CSS examples use the same native functions as the generator. They are reference values; use the copy controls above for your current settings.

/* Diagonal card */
background: linear-gradient(135deg, #8b7bff 0%, #35d6c8 100%);

/* Centered spotlight */
background: radial-gradient(circle at center, #35d6c8 0%, #6e5df2 100%);

/* Circular color sweep */
background: conic-gradient(from 0deg at center, #8b7bff 0%, #35d6c8 50%, #8b7bff 100%);

Stops, transparency, and a clean seam

Move a stop to control where a color is reached, not how wide its swatch is in the settings panel. Adjacent stops at the same position create a hard edge. Lower opacity lets the background beneath show through, so test on the actual surface. For a smooth conic loop, make the first and last colors match; different endpoints create a visible seam.

Copy and test in context

Copy CSS includes the .degradado selector and background declaration. Copy value returns only the gradient function, suitable for your own background property. Check the result at mobile and desktop widths: the angle can stay the same while the shape of the box changes the visible transition.

For text over a gradient, check contrast at every color behind the letters, including translucent areas. A good result at one endpoint does not certify the whole background. If needed, add an opaque text surface. Use Live Color Preview for individual color pairs and test the final design separately.

Why do I see bands or a line in the gradient?

A conic seam can come from mismatched first and last colors. Broad tonal bands can depend on the display, color depth, and chosen colors. Try another stop or a smaller transition area. An optional subtle noise layer can mask banding, but is not part of this generator's output and adds another asset to maintain.

Can I animate the generated gradient?

The copied code is a static background. Animation needs additional CSS; the generator does not add keyframes. If you animate it in your project, consider rendering cost and a reduced-motion alternative.

All CSS generators · Color palettes · Downloadable web templates