This tool generates the CSS to fill text with a smooth colour gradient instead of a flat colour. Pick a start colour, an end colour and an angle, and preview the result live before copying the CSS. It is a popular effect for headings and hero text, and this generator handles the slightly fiddly technique for you.
How it works
Gradient text relies on the background-clip: text technique: you apply a linear gradient as the element’s background, clip that background to the shape of the text, then make the text colour transparent so the gradient shows through the letterforms. The tool builds the linear-gradient(angle, from, to) from your inputs and outputs all four required declarations, including the -webkit- prefix for broad browser support.
Example
An indigo-to-pink gradient at 90 degrees produces:
background: linear-gradient(90deg, #6366f1, #ec4899);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
Apply this to a heading and its text fills left-to-right from indigo to pink. Everything runs in your browser — nothing is uploaded.
Everything runs in your browser — nothing is uploaded.