gradient text css generator

Gradient Text CSS Generator

Full control over every color stop's position, a dedicated glow color, and linear, radial, or conic gradients — not just an even 2-3 color blend.

preview.html
Gradient Text
controls
gradient-text.css

          

How linear gradient text CSS works

A linear gradient text css effect applies a linear-gradient(), radial-gradient(), or conic-gradient() as the element's background, then uses background-clip: text with a transparent text color so only the letterforms show the gradient underneath. Each color stop's position is a percentage along that gradient — moving it shifts exactly where one color ends and the next begins.

Adding a css text shadow glow

Because clipped text has no visible fill for text-shadow to glow from, the generator uses filter: drop-shadow() with its own independent highlight color instead, which glows around the actual rendered letter shapes for a clean neon effect at any size — no need to reuse one of the gradient colors.

Worked example: a three-colour gradient headline

With the default angle, three colour stops, and 42px size, the generator writes:

default output
.gradient-text {
  background: linear-gradient(90deg, #a78bfa 0%, #f472b6 50%, #5eead4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 42px;
  font-weight: 800;
}

/* fallback color for browsers without background-clip: text */
.gradient-text { color: #a78bfa; }

Three things have to be true at once for the effect to work. The background is a gradient, background-clip: text limits that background to the shapes of the letters, and the normal text fill is made transparent so the gradient shows through. That last step is why the output sets both color: transparent and -webkit-text-fill-color: transparent.

The final rule is a solid fallback colour for browsers that don't support background-clip: text. Browsers that do support it still show the gradient, because -webkit-text-fill-color takes priority over color for the glyph fill.

Gradient angle cheat sheet

AngleDirection of the gradient
0degBottom to top
45degBottom-left to top-right
90degLeft to right (the default here)
180degTop to bottom
270degRight to left

Frequently asked questions

Why isn't my gradient text showing any color?

This effect relies on background-clip: text combined with a transparent text color. If either the -webkit- prefix or the transparent color is missing, most browsers will just show solid black text instead of the gradient.

Does gradient text work in all browsers?

background-clip: text has broad support in current Chrome, Firefox, Safari, and Edge, but Safari specifically still needs the -webkit-background-clip prefix — which is why the generated CSS always includes both.

Can I animate a gradient text effect?

Yes — animating background-position on a gradient that's wider than the text container creates a smooth color-shift or shimmer effect. That's a common follow-up to a static gradient once the base effect looks right.

Will gradient text hurt my SEO or accessibility?

No, the underlying text content is unchanged and still fully selectable and readable by screen readers — only the visual rendering changes. Just make sure contrast against the background stays high enough to remain legible.

Also by the creator clukr.com Hatch it. Read it. Gone. Encrypted in your browser. Read once, then it's erased. No recipient account needed.
Copied!