Prism Kit
Tools About Contact
Guide

CSS Gradients: linear, radial, and conic

What the Gradient Generator builds, and the two gradient types it doesn't — with examples of when to reach for each.

Linear gradients: the default choice

A linear gradient blends colors along a straight line at a chosen angle. It's the gradient behind most buttons, hero banners, and card overlays because it reads as "one smooth surface" rather than drawing attention to itself.

background: linear-gradient(135deg, #FF6B4A, #5B6EE8);

The angle is measured clockwise from the top: 0deg points up, 90deg points right, 180deg points down. Most UI gradients land between 120deg and 160deg, which reads as a natural "light source from the upper left" without feeling directional or busy.

Radial gradients: drawing the eye to a point

A radial gradient spreads outward from a center point instead of a line. It's a good fit for spotlight effects, badges, or backgrounds where you want attention pulled toward the middle of an element rather than across it.

background: radial-gradient(circle at center, #FF6B4A, #15161B);

The circle at center part can be changed to ellipse at top left or similar to reposition and reshape the gradient — useful for glow effects positioned behind a specific UI element rather than centered on the whole container.

Conic gradients: pie charts, wheels, and loaders

A conic gradient rotates color around a center point rather than radiating outward. It's the shape behind color wheels, progress rings, and pie-chart-style visualizations.

background: conic-gradient(from 0deg, #FF6B4A, #5B6EE8, #FF6B4A);

Repeating the first color at the end (as above) avoids a hard seam where the gradient wraps back around to its starting angle.

Color stops: controlling where a color starts and ends

By default, colors in a gradient are spaced evenly. Adding a percentage after any color pins it to a specific point along the gradient:

background: linear-gradient(135deg, #FF6B4A 0%, #FF6B4A 40%, #5B6EE8 100%);

This holds the first color solid until 40% of the way through, then blends into the second color over the remaining 60% — useful for a gradient that should look mostly flat with just a hint of color shift at the edge.

Building your own with the Gradient Generator

The Gradient Generator on this site builds two-color linear gradients with a live angle control, and gives you the exact CSS line to copy. For a three-color gradient or a radial/conic variant, generate the two-color base here, then edit the function name and add an extra color stop by hand using the patterns above.

© 2026 Prism Kit. All tools run locally in your browser.
AboutPrivacy PolicyContact