Linear gradients
A linear gradient blends colours along a straight line. The first value sets the direction, then you list colour stops with optional positions:
background: linear-gradient(135deg, #6366F1 0%, #06B6D4 100%);
How colour stops work
Each stop is a colour and a position. Between two stops the browser blends smoothly; placing two stops at the same position creates a hard edge, which is how stripes are made. Two to four stops usually look cleaner than many. In the Pattern Studio you can drag stops along the gradient bar and watch the CSS update live.
Radial and conic gradients
- radial-gradient(circle at 50% 30%, …) radiates from a point — great for glows and spotlights.
- conic-gradient(from 0deg, …) sweeps around a centre — useful for pie-chart effects, colour wheels and checkerboards.
- repeating-linear-gradient(…) repeats a pattern of stops to create stripes.
Mesh-style backgrounds
CSS has no native mesh gradient, but layering several radial gradients — each fading to transparent — on top of a base colour produces the soft multi-colour look. The Mesh gradient and Aurora presets in the Pattern Studio are built exactly this way and can be copied as plain CSS or Tailwind classes.
Keep text readable
Text over a gradient must meet contrast requirements across the whole area, not just at one end. Check the lightest and darkest parts behind your text with the Contrast Checker, or place text on a solid or semi-transparent card.
Key takeaways
- Direction first, then colour stops.
- Same-position stops make hard edges.
- Layer radial gradients for mesh effects.
- Check contrast across the whole gradient.
Published 18 November 2026 by the Cloude Tools team.