Effect #045 in our rendered series
Blend-difference captions
Caption text that flips between white and black by itself as a bright band sweeps behind it, using the difference blend mode.
Rendered by us at 1920x1080 over a shot from Tears of Steel (Blender Foundation, CC-BY 3.0). Expand plays the full 1080p file with the film's sound.
Edit in Premiere, Resolve or After Effects? Jump to editor templates. Making many versions of the same video? Use the code route.
Make this effect with
Built and tested by us
Other ways, not tested by us
Use it in a real edit
The demo above already plays the composition over real footage: the clip is a muted <video> layer under the graphics (the file plate.mp4 in the code below), and the film's sound is added to the finished file. Replace that file with your own clip and render again. To use the graphics in an editor instead, switch the background off and render a transparent MOV (an H.264 MP4 cannot carry transparency):
npx hyperframes render . -o overlay.mov --format mov --fps 24 --variables '{"plate":false}'The routes in full
With Claude Code: the prompt we used
Rendered and tested by us in HyperFrames 0.8.10 on Nov 14, 2026.
Make a 5 second caption demo where the text uses mix-blend-mode difference so it automatically flips between white and black as a bright band sweeps behind it, three short caption lines on the beats, with a transparent background option.
What changed since this prompt: the demo on this page is our second version, 6 seconds long, rebuilt on a shot from Tears of Steel with the same animation idea. The full composition below is the one we rendered; its build log lists every change.
Built by a Claude Code subagent (Sonnet) from the HyperFrames registry block caption-blend-difference, HyperFrames 0.8.10. Claude Code then checked the composition with hyperframes lint and hyperframes check before we rendered it.
What we had to correct (8 notes from the build log):
- 2026-11-06 07:31 lint run 1: 0 errors, 0 warnings. No fixes needed.
- Kept the registry technique: mix-blend-mode difference on the caption container, white text, isolation: isolate on the composition root.
- Decision: with plate false the dark background is removed but the sweeping band stays, because the band is what the text inverts against. On a transparent render the band is the only thing the captions blend with, so the band is part of the effect, not part of the plate. Over real footage the inversion happens only against the band, not the footage, since the transparent MOV is composited afterwards.
- Decided against animating the blend mode itself or using exclusion; plain difference reads clearest.
- First render: flash check FAILED (max_general_flashes_per_second 4, limit 3). Cause: the white band was 560 px wide on a 1920 px frame, so with its skew it covered about 29 percent of the screen, above the 25 percent area the flash rule counts, and it crossed the frame three times.
- Fix: band width 380 px (about 20 percent of the frame, edges fade out). Re-rendered and re-checked below.
- v2 (7 Nov 2026): rebuilt on Tears of Steel footage (plate dlg_space, 6.0 s, pink cutaway cut out) with the film's sound. The caption now lives in a dark strip 80 px above the bottom edge (84 px text, 76 and 92 in the small and large variations, one line per phrase); a light band sweeps left to right through the strip at reading speed and the difference blend flips the text under it to black (to the complement colour with a coloured band). Words pop in on the spoken word of 'You have your robotics... and I just want to be awesome in space.' The old full-frame white band over the picture was dropped: over real footage it washed out the faces.
- v2 (14 Nov 2026): the caption strip now fits the widest line and sits centred (it was a full-width bar that looked empty around short phrases); rendered again.
With HyperFrames code
Rendered and tested by us in HyperFrames 0.8.10 on Nov 14, 2026.
npx hyperframes add caption-blend-difference
npx hyperframes render . -o out.mp4 --fps 24Settings you can change without rebuilding (pass them with --variables):
| Setting | Name | Type | Default |
|---|---|---|---|
| Band colour | bandColor | color | #ffffff |
| Caption size | captionSize | enum | medium |
| Show background | plate | boolean | true |
Our full composition (index.html, 6 KB)
<!doctype html>
<html lang="en" data-composition-variables='[{"id":"bandColor","type":"color","label":"Band colour","default":"#ffffff"},{"id":"captionSize","type":"enum","label":"Caption size","default":"medium","options":[{"value":"small","label":"Small"},{"value":"medium","label":"Medium"},{"value":"large","label":"Large"}]},{"id":"plate","type":"boolean","label":"Show background","default":true}]'>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=1920, height=1080" />
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@800&display=block" rel="stylesheet" />
<script src="gsap.min.js"></script>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 1920px; height: 1080px; overflow: hidden; background: transparent; }
#root { position: relative; width: 100%; height: 100%; overflow: hidden; background: transparent; }
#plate { position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 40%, #1b2335 0%, #0b0d12 70%); overflow: hidden; }
#world { position: absolute; left: -200px; top: -120px; width: 2400px; height: 1320px; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); }
.b1 { width: 760px; height: 760px; left: 180px; top: 260px; background: var(--accent); opacity: 0.35; }
.b2 { width: 900px; height: 900px; left: 1200px; top: 80px; background: #2f6bff; opacity: 0.45; }
.grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 120px 120px; }
#root { isolation: isolate; --accent: #ff5a36; }
/* footage plate (v2): real footage, pinned, no generated blobs */
#plate { background: #000 !important; }
#world { left: 0 !important; top: 0 !important; width: 1920px !important; height: 1080px !important; transform: none !important; }
#world .blob, #world .grid { display: none !important; }
#pv { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; object-fit: cover; }
#scrim { position: absolute; inset: 0; background: transparent; }
#strip { position: absolute; left: 50%; bottom: 80px; max-width: 1728px; border-radius: 26px; overflow: hidden; background: rgba(9,11,18,0.9); isolation: isolate; box-shadow: 0 16px 40px rgba(0,0,0,0.4); opacity: 0; }
#band { position: absolute; left: 0; top: -10px; bottom: -10px; width: 380px; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, var(--band) 22%, var(--band) 78%, rgba(255,255,255,0) 100%); }
#caps { position: relative; padding: 22px 44px 26px; display: grid; place-items: center; mix-blend-mode: difference; color: #ffffff; }
.cap { grid-area: 1 / 1; font-family: "Montserrat", sans-serif; font-weight: 800; font-size: var(--cs); line-height: 1.1; letter-spacing: -0.02em; text-transform: uppercase; text-align: center; max-width: 1580px; opacity: 0; }
.cw { display: inline-block; opacity: 0; }
</style>
</head>
<body>
<div id="root" data-composition-id="main" data-start="0" data-duration="6.0" data-fps="24" data-width="1920" data-height="1080">
<div id="plate"><div id="world"><video id="pv" src="plate.mp4" muted playsinline data-start="0" data-duration="6.0"></video><div id="scrim"></div><div class="blob b1" id="b1"></div><div class="blob b2" id="b2"></div><div class="grid"></div></div></div>
<div id="strip"><div id="band"></div><div id="caps"></div></div>
</div>
<script>
window.__timelines = window.__timelines || {};
(function () {
const v = window.__hyperframes.getVariables();
const PH = [[["You", 0.24, 0.8], ["have", 0.8, 0.98], ["your", 0.98, 1.22], ["robotics...", 1.22, 1.95]], [["and", 2.49, 2.71], ["I", 2.71, 2.89], ["just", 3.43, 3.61], ["want", 3.61, 3.83]], [["to", 3.83, 3.93], ["be", 3.93, 4.09], ["awesome", 4.09, 4.45], ["in", 4.45, 4.63], ["space.", 4.63, 5.43]]];
const D = 6.0;
const root = document.getElementById("root");
root.style.setProperty("--band", v.bandColor || "#ffffff");
const SZ = { small: "76px", medium: "84px", large: "92px" };
root.style.setProperty("--cs", SZ[v.captionSize] || SZ.medium);
if (!v.plate) document.getElementById("plate").style.display = "none";
const tl = gsap.timeline({ paused: true });
const capsEl = document.getElementById("caps");
const strip = document.getElementById("strip");
gsap.set(strip, { xPercent: -50 }); // 14 Nov 2026: the strip fits the widest line and stays centred
PH.forEach(function (p, pi) {
const cap = document.createElement("div"); cap.className = "cap"; cap.id = "c" + pi;
p.forEach(function (wv, wi) {
const w = document.createElement("span"); w.className = "cw"; w.id = "cw" + pi + "_" + wi; w.textContent = wv[0];
cap.appendChild(w);
if (wi < p.length - 1) cap.appendChild(document.createTextNode(" "));
});
capsEl.appendChild(cap);
});
PH.forEach(function (p, pi) {
const s = p[0][1], e = p[p.length - 1][2];
const prevE = pi > 0 ? PH[pi - 1][PH[pi - 1].length - 1][2] : -9;
const nextS = pi < PH.length - 1 ? PH[pi + 1][0][1] : 99;
const joinPrev = s - prevE < 0.6; // back-to-back phrases share the strip: only the caption swaps
const joinNext = nextS - e < 0.6;
const out = joinNext ? nextS - 0.04 : Math.min(e + 0.4, D - 0.02);
tl.set("#c" + pi, { opacity: 1 }, joinPrev ? s - 0.04 : s - 0.15);
if (!joinPrev) tl.fromTo(strip, { opacity: 0, y: 24 }, { opacity: 1, y: 0, duration: 0.14, ease: "power2.out" }, s - 0.15);
// the band sweeps left to right under the spoken words
tl.fromTo("#band", { x: -400, skewX: -14 }, { x: 1740, skewX: -14, duration: Math.max(0.5, e - s + 0.5), ease: "none" }, s - 0.1);
p.forEach(function (wv, wi) {
tl.fromTo("#cw" + pi + "_" + wi, { opacity: 0, y: 18, scale: 0.9 }, { opacity: 1, y: 0, scale: 1, duration: 0.2, ease: "back.out(1.7)" }, wv[1]);
});
if (!joinNext) tl.to(strip, { opacity: 0, y: -16, duration: 0.2, ease: "power2.in" }, out - 0.2);
tl.set("#c" + pi, { opacity: 0 }, out);
});
window.__timelines["main"] = tl;
})();
</script>
</body>
</html>
With Remotion
We have not built this effect in Remotion. If you use it, read its licence first: Individuals (personal or commercial use), organisations or teams with a total headcount of 3 or less, non-profits, and anyone evaluating Remotion before commercial use. A company does not qualify merely because it is unprofitable. Everyone not eligible for the Free License needs a Company License. Remotion licence FAQ, checked Nov 4, 2026.
In your editor: Premiere, Resolve, After Effects, CapCut
We have not reviewed an editor template for this effect yet.
Variations
The same composition rendered again with different settings. Nothing was rebuilt.
{"captionSize":"small","bandColor":"#cfd6e6"}{"captionSize":"large","bandColor":"#ffffff"}{"bandColor":"#ffd23f","captionSize":"large"}Spec and test details
- Engine
- HyperFrames 0.8.10, GSAP 3.14.2 (local copy)
- Length and frame rate
- 6 seconds at 24 fps, rendered at 1920x1080
- Video files on this page
- H.264: 1920x1080 for Expand (5741.1 KB), 1280x720 in the page (1462.1 KB), 640x360 in galleries (256.5 KB); the 1080p and 720p files carry the film's sound
- Picture check
- The 1080p file scores VMAF 99.06 against our render master and keeps 97% of its edge detail (measured by us with FFmpeg libvmaf and OpenCV)
- Footage
- Celia close-up, then Thom close-up (the film's pink text cutaway removed with a matched 1.87 s cut in picture and sound); 'You have your robotics... and I just want to be awesome in space.' (Tears of Steel, 5:20)
- Tested in editors
- None yet
- Flash check
- Passed: at most 1 general and 0 red flashes in any second. automated approximation of WCAG 2.3.1 on a 96x54 grid, whole loop including the restart; not a certification.
- Licence
- Composition adapted by us from the HyperFrames registry (Apache-2.0); text fonts from Google Fonts under the SIL Open Font License.
- Last tested
- Nov 14, 2026
- Machine
- Laptop: AMD Ryzen 7 7735U (8 cores, 16 threads), 31 GB RAM, Windows 11 Home; CPU rendering
Technical details: render times and file sizes
- Render of the 6-second master: 44.3 s (2 render workers, on the laptop above).
- full.mp4: 5741.1 KB
- hero.mp4: 1462.1 KB
- hero.webp: 37.8 KB
- tile.mp4: 256.5 KB
- tile.webp: 12.4 KB
- Variation "subtle": rendered in 39.1 s, 253 KB
- Variation "bold": rendered in 35.8 s, 253.9 KB
- Variation "colour": rendered in 56.2 s, 256.8 KB
Credits
- Built from the HyperFrames registry component caption-blend-difference by HeyGen (Apache-2.0), adapted by us.
- Fonts from Google Fonts, under the SIL Open Font License.
- Footage: Tears of Steel, (c) Blender Foundation, mango.blender.org, licensed CC-BY 3.0. We cropped the shots to 16:9 and laid our graphics over them.
- Editor templates and other routes on this page belong to their creators, who are credited on each card.
Related effects and jobs
Page checked on Nov 4, 2026.


