Overview
A generator for gradient-filled headlines using the background-clip: text technique. You type the text, pick two or three gradient stops, set the angle, and adjust font size and weight on sliders. The preview renders live glyphs filled with the gradient, and the output emits the complete rule including both the -webkit- prefixed and standard clip properties.
How It Works
Enter your headline in the preview text field. Choose color one and color two with the pickers, and optionally enable the third stop checkbox to add a third color. Set the gradient angle from 0 to 360 degrees, font size from 20 to 120 pixels, and font weight from 300 to 900 in steps of 100. The preview re-renders as you drag, and the output box shows a .gradient-text class with the linear-gradient background, background-clip: text, -webkit-text-fill-color: transparent, and your size and weight.
Step-by-Step Usage Guide
- Type the headline text you want to fill.
- Pick two colors, or enable the checkbox and pick a third.
- Set the angle, font size and weight.
- Copy the .gradient-text rule.
Technical Specifications & Standards
The technique works by clipping the element background to the alpha of its own glyphs: background-clip: text restricts the painted background to the text geometry, and -webkit-text-fill-color: transparent makes the fill itself see-through so the clipped background shows. Chromium and Safari still require the -webkit- prefixed form of background-clip for text, which is why the emitted CSS carries both it and the standard property. WebKit also supports -webkit-text-fill-color as a fill-specific override that beats the color property in the cascade. Two practical consequences: the text remains real, selectable, screen-reader-friendly text rather than an image, but any fallback that hides the text, such as color: transparent without clip support, makes it invisible; the snippet avoids that by relying on text-fill-color which old engines simply ignore.
Targeted Use Cases
- Hero headlines that pick up brand gradient colors.
- Logotype and wordmark experiments without editing an image.
- Pricing or banner numbers that need emphasis beyond a flat color.
- Social card titles rendered as styled HTML rather than graphics.
Notes & Gotchas
- Keep a readable fallback color for browsers without clip support by testing the snippet early.
- Use heavier weights, because thin glyphs leave too little area for the gradient to read.
- Limit yourself to two or three stops; many stops turn headline text into noise.
- Check contrast of the darkest gradient stop against the page background for accessibility.
Frequently Asked Questions
Is gradient text still selectable and accessible?
Yes. The element remains ordinary text; only its paint is a clipped background. Screen readers and text selection work exactly as with a solid-colored heading.
Why does the output include -webkit- properties?
Chromium and Safari require -webkit-background-clip: text to clip a background to glyphs, and -webkit-text-fill-color: transparent to clear the glyph fill. Firefox honours the standard background-clip: text form, so both are emitted.
Can I use more than three colors?
The interface offers two stops plus an optional third. After copying you can extend the gradient argument with more comma-separated colors; nothing in the technique limits the count.
Does the gradient follow the text when it wraps?
The background paints over the element box, so a multi-line headline shares one gradient across all lines. At a 90 degree angle each line shows the same horizontal slice of the ramp.