What you’ll build

A caption preset whose emphasis words are filled with a gradient that always fits the letters, plus two animated variations: a colour reveal that wipes a new colour across the word as it’s spoken, and a keyframed gradient shift whose motion you draw by hand but which still fits every word. It builds on Animated Light Sweep on Text — the same word variables, markers and progress-slider idea, applied to gradients.

Start of Ramp = [_acWordX, _acWordT]  ·  End of Ramp = [_acWordX, _acWordB] GO GOLDEN fits a short word and a long one — and moves with it

Why gradients break on captions

Gradient Ramp draws between two points, Start of Ramp and End of Ramp. On a text layer those points are fixed positions in the frame. Set them up on your template word and they look perfect — until a caption appears lower in the frame, the word is longer, or you move the captions. Then the word ends up all one colour, or the gradient band sits beside it.

The fix is the same as for light sweeps: place the points from the word’s own edges using the word variables _acWordL, _acWordR, _acWordT, _acWordB, _acWordX, _acWordY, _acWordW and _acWordH. They’re explained in the light sweep tutorial.

Step 1 — Add Gradient Ramp to the word

EMPHASIS → Effect → Generate → Gradient Ramp
  1. Create a preset (+ New Preset in the Captyne panel) or open one you’re editing, and select the EMPHASIS layer.
  2. Add Gradient Ramp. On a text layer it colours only the letters, replacing the fill colour.
  3. Set Start Color to a light gold (for example #FFE9A8) and End Color to a deep orange (#F08A24).
  4. Keep Ramp Shape on Linear Ramp, Blend With Original at 0 and add a little Ramp Scatter (5–10) if you see banding.

Step 2 — Lock the gradient to the word

You have two options.

Option A — drag the points (still gradients)

For a gradient that doesn’t move, just drag Start and End of Ramp where you want them on the template word. When you capture, Captyne saves each point as a fraction of the word’s box (for example “centre, top edge”) and on generate turns it into a live expression, so it fits every word and follows it. This works for Gradient Ramp, CC Light Sweep, CC Light Rays, CC Radial Fast Blur, CC Radial Blur, Radial Blur, Corner Pin, Circle, Lens Flare and Lightning.

Option B — expressions (exact and animatable)

Alt-click (Option-click on Mac) the stopwatch of each point and paste one of these pairs:

DirectionStart of RampEnd of Ramp
Top → bottom[_acWordX, _acWordT][_acWordX, _acWordB]
Left → right[_acWordL, _acWordY][_acWordR, _acWordY]
Diagonal[_acWordL, _acWordT][_acWordR, _acWordB]
Radial (set Ramp Shape to Radial Ramp)[_acWordX, _acWordY][_acWordR, _acWordY]

To push a colour further into the word, move a point inside the box with a fraction, for example a gradient that only starts darkening in the bottom third: Start [_acWordX, _acWordT + _acWordH * 0.66].

⚠

“_acWordX is not defined”? Click ⊙ Capture Preset once in a new preset and Captyne adds the variables. Outside Captyne, paste the variable block at the top of the expression.

Step 3 — Animate a colour reveal with markers

A colour reveal wipes a new colour across the word, often while it’s being spoken. With Gradient Ramp it’s two points moving together: a short, soft gradient whose position travels from left to right.

  1. Set Start Color to the reveal colour (say bright yellow) and End Color to the word’s normal colour (white). Ramp Shape: Linear Ramp.
  2. Add two layer markers named SE_IN and SE_OUT where the reveal should start and finish. If you leave them out, the expressions use IN_END and OUT_START.
  3. Put this on Start of Ramp:
var s, e; try { s = thisLayer.marker.key("SE_IN").time; } catch (err) { s = thisLayer.marker.key("IN_END").time; } try { e = thisLayer.marker.key("SE_OUT").time; } catch (err) { e = thisLayer.marker.key("OUT_START").time; } var soft = 30; // width of the soft edge in pixels var t = ease(time, s, e, 0, 1); var x = linear(t, 0, 1, _acWordL - soft, _acWordR + soft); [x - soft, _acWordY]

…and the same on End of Ramp, with the last line changed to:

[x + soft, _acWordY]

Everything left of the moving edge shows the reveal colour, everything right of it the normal colour. Drag SE_IN and SE_OUT to change the timing — on generate both are rescaled to each word’s duration, so the wipe always completes inside the word. Set soft to 2 for a hard edge or 60 for a dreamy blend.

Step 4 — Relative keyframes with a progress slider

Want the gradient to move with a curve you shape yourself — ease in, overshoot, sweep back? Don’t keyframe Start and End of Ramp: point keyframes are fixed pixel positions and can’t adapt to another word. Keyframe a percentage instead and let an expression turn it into positions on the word.

  1. Add Effect → Expression Controls → Slider Control and rename it Gradient Progress.
  2. Keyframe its Slider from 0 to 100, with any curve or extra keyframes in between.
  3. Put this on Start of Ramp:
var p = effect("Gradient Progress")("Slider"); var s, e; try { s = thisLayer.marker.key("SE_IN").time; } catch (err) { s = thisLayer.marker.key("IN_END").time; } try { e = thisLayer.marker.key("SE_OUT").time; } catch (err) { e = thisLayer.marker.key("OUT_START").time; } var v = p.value; if (p.numKeys >= 2) { var k1 = p.key(1).time, k2 = p.key(p.numKeys).time; v = p.valueAtTime(linear(time, s, e, k1, k2)); // your keyframes, retimed to the markers } var soft = 30; var x = (_acWordL - soft) + (_acWordW + soft * 2) * v / 100; // 0% = left, 100% = right [x - soft, _acWordY]

Use the same expression on End of Ramp with the last line changed to [x + soft, _acWordY].

The keyframe values mean “percent across the word”, so the motion is relative to every word and follows it when it moves. The markers decide when it plays. To change the motion, edit the keyframes; to change the timing, drag the markers.

💡

Keep one Slider Control per layer and use other control types (Angle Control, Checkbox Control) if you need more, so every control is restored correctly on generate. If the same layer also has the light sweep from the previous tutorial, drive both from one slider.

Step 5 — Four-colour gradients that fit the word

EMPHASIS → Effect → Generate → 4-Color Gradient

4-Color Gradient blends four colours from four points, which gives richer, more organic fills than a two-colour ramp. Captyne doesn’t convert its still points automatically, so place them with expressions — one per corner:

PointExpression
Point 1[_acWordL, _acWordT]
Point 2[_acWordR, _acWordT]
Point 3[_acWordL, _acWordB]
Point 4[_acWordR, _acWordB]

For a living, slowly shifting gradient, let the points drift inside the word. On Point 1:

var a = time * 2; // speed [_acWordL + _acWordW * (0.25 + 0.25 * Math.sin(a)), _acWordT + _acWordH * (0.25 + 0.25 * Math.cos(a))]

Copy it to the other points, changing the 0.25 base values (for example 0.75 for the right or bottom side) and the speed slightly for each, so they don’t move in sync.

Combine it with a light sweep

Gradient plus shine is a classic premium caption look. Stack the effects on the EMPHASIS layer in this order:

  1. Gradient Ramp — top-to-bottom gold, locked as in Step 2.
  2. CC Light Sweep — the marker-driven sweep from the light sweep tutorial.
  3. Glow — Glow Based On Alpha Channel, a small radius, to make the metal shine.

Order matters: the sweep has to come after the gradient, or the gradient paints over it.

Test, capture and generate

CheckWhat should happen
Short and long words“GO” and “UNBELIEVABLE” both show the full gradient, light at the top and dark at the bottom.
Move the layerThe gradient stays inside the letters wherever the word is.
Drag SE_IN / SE_OUTThe colour reveal starts and ends with the markers.
Edit Gradient ProgressThe motion changes; the timing still follows the markers.
Expression errorsNo yellow warning bar in the Composition panel.

Click ⊙ Capture Preset, then transcribe a clip and click Generate Captions. Move ACP_MASTER or an ACP_SET_n_CTRL null and check the gradients come with the words.

Turn your gradient designs into captions

Captyne applies your After Effects styles to every word automatically, with AI transcription built in.

See Plans & Pricing →

FAQ

How do I add a gradient to text in After Effects?

Select the text layer and apply Effect → Generate → Gradient Ramp. It colours only the letters. Set the start and end colours, then place Start of Ramp and End of Ramp on the text — with expressions if you want them to follow the text.

Why is my whole word one colour after I move it?

The ramp’s points stayed where they were in the frame and the word moved away from them. Drive the points from the text’s bounds (Step 2) and they move with it.

How do I animate a gradient across text?

Move both points together. Step 3 does it with markers for an automatic colour wipe; Step 4 does it with a keyframed progress slider so you control the curve while it still fits any word.

Can I use a gradient and a stroke together?

Yes. Gradient Ramp replaces the fill colour, and the stroke from the Character panel is coloured too. For a solid-colour stroke, put the stroke on a duplicate layer underneath, or use the Stroke layer style.

Does this work with presets from the Captyne Marketplace?

Yes. Any preset you build this way can be submitted to the Captyne Marketplace, and buyers get gradients that fit their own captions automatically.

Previous: Animated Light Sweep on Text: Lock It to Every Word and Time It With Markers.