Skip to content
Jellykit

Gradient Text Generator

Fill headings with a linear, radial or conic gradient and copy CSS that falls back to a solid color.

  • Runs on your device
Loading tool

About Gradient Text Generator

Type a word, choose two to four colors and a gradient type, and watch the letters fill in. Linear and conic gradients take an angle; radial ones take a circle or ellipse shape. Switch on hard bands for crisp stripes instead of blends.

The CSS sets a plain fallback color first and adds the gradient inside an @supports block, so a browser that cannot clip a background to text shows readable solid text rather than nothing.

How it works

  1. The colors become a CSS gradient whose stops are spaced evenly. Hard bands give each color an equal slice with two positions per stop, so neighbours meet with no blend.
  2. A conic gradient ends where it began, so a blended one repeats the first color at 100% to avoid a visible seam.
  3. The gradient is painted as the background of the text and clipped to the letter shapes with background-clip: text, while the text itself is made transparent.
  4. Both the -webkit- prefixed and the standard clip are written, because Safari still needs the prefix for text clipping.

Questions

Why does the gradient stretch across the whole line instead of just the word?

The gradient fills the background of the element, which for a block element is the full width of its container. Put the class on an inline or inline-block element, such as a span inside the heading, to fit the gradient to the text.

What does the fallback color do?

It is the color the text keeps in a browser that does not support clipping a background to text. The gradient rules sit inside @supports, so they apply only where they work.

Is gradient text accessible?

Screen readers read it as normal text. Check that every part of the gradient has enough contrast with the background, since the lightest stop decides how readable the faintest letters are.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.