mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
docs: address review on the color grading chapter
- Repoint the generated-artwork exit bridge at color-grading. The nav inserted the new page between generated-artwork and vfx-and-liquid-glass but the "Next" link still skipped it (miga-heygen, blocking). - Correct the LUT custom property name: --hf-color-grading-lut-intensity, not --hf-color-grading-lut. Real transcription error, surfaced while checking the CSS-variable review comment against the source table in packages/core/src/colorGrading.ts:921-931. - Add #t=0.1 posterframe hints and a contextual italic caption to all ten videos, matching the sibling prompting chapters. - Reconcile British spelling to American throughout. The file path, nav slug, page title and every cross-reference were already "color". - De-duplicate the animatable-effect caveat list: the chapter now links to the guide's Animating a Grade section instead of restating which effects are verified working, so the list is maintained in one place. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
2517f1773f
commit
e4eac0c215
@@ -183,7 +183,7 @@ overcook.
|
||||
|
||||
For worked examples — ten graded A/B renders, each with the plain-language
|
||||
prompt that produced it and the payload it compiled to — see
|
||||
[Colour grading and film effects](/prompting/color-grading) in the Prompt Guide.
|
||||
[Color grading and film effects](/prompting/color-grading) in the Prompt Guide.
|
||||
It covers the failures this page cannot: choosing a source that actually has
|
||||
something for the treatment to remove, and separating a subject so one part of
|
||||
the frame can be graded while the rest is protected.
|
||||
@@ -254,7 +254,8 @@ directly:
|
||||
```text
|
||||
--hf-color-grading-ascii --hf-color-grading-bloom --hf-color-grading-blur
|
||||
--hf-color-grading-dither --hf-color-grading-exposure --hf-color-grading-intensity
|
||||
--hf-color-grading-kuwahara --hf-color-grading-lut --hf-color-grading-pixelate
|
||||
--hf-color-grading-kuwahara --hf-color-grading-pixelate
|
||||
--hf-color-grading-lut-intensity
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: Colour grading and film effects
|
||||
title: Color grading and film effects
|
||||
description: "Grade media with a fixed-order pipeline — tonal work, hue keys, print and analogue treatments — and know why the source matters more than the payload."
|
||||
---
|
||||
|
||||
Every chapter so far has built the image. This one changes what the image appears to have been *recorded on*. A grade is not decoration applied at the end; it is a claim about the medium — that this came off tape, or a press, or a tube, or a camera with a particular stock in it. Viewers read that claim instantly and they read it whether or not you meant it.
|
||||
|
||||
Grading attaches to a single `<img>` or `<video>` through a `data-color-grading` payload. It never touches your text, your cards, or your captions — only the pixels of the media element it is on. The full contract lives in the [Colour Grading guide](/guides/color-grading); this chapter is about what to *ask for*, and about the three ways these prompts go wrong.
|
||||
Grading attaches to a single `<img>` or `<video>` through a `data-color-grading` payload. It never touches your text, your cards, or your captions — only the pixels of the media element it is on. The full contract lives in the [Color Grading guide](/guides/color-grading); this chapter is about what to *ask for*, and about the three ways these prompts go wrong.
|
||||
|
||||
## The source has to have something to lose
|
||||
|
||||
@@ -15,11 +15,11 @@ Three worked examples from building this page, each of which produced a demo tha
|
||||
|
||||
| Treatment | Wrong source | Why it showed nothing |
|
||||
| --- | --- | --- |
|
||||
| Hue key — hold one colour | Talking head in a kitchen | Skin **is** the red band. Keying red kept the face; 6% of pixels moved. |
|
||||
| Hue key — hold one color | Talking head in a kitchen | Skin **is** the red band. Keying red kept the face; 6% of pixels moved. |
|
||||
| Two-ink press | Black type on white paper | Already two-tone. Nothing to collapse. |
|
||||
| Kuwahara — painterly | Soft-focus office | An edge-preserving smoother needs edges to preserve. |
|
||||
|
||||
Fixing all three meant changing the footage, not the payload. So specify the subject in the prompt, and specify it in terms of the property the effect consumes: *"pick a subject with dense colour and dense edges"*, *"the surround has to carry colour, not be neutral grey"*.
|
||||
Fixing all three meant changing the footage, not the payload. So specify the subject in the prompt, and specify it in terms of the property the effect consumes: *"pick a subject with dense color and dense edges"*, *"the surround has to carry color, not be neutral grey"*.
|
||||
|
||||
## The pipeline order is fixed
|
||||
|
||||
@@ -29,7 +29,7 @@ Sections apply in a set order regardless of how you write them:
|
||||
adjust → wheels → curves → hueCurves → secondaries → lut → details → effects
|
||||
```
|
||||
|
||||
This is not cosmetic. A global `saturation: -0.9` in `adjust` runs *before* `secondaries`, so a hue-keyed selection that tries to hold one colour back finds it already desaturated and has nothing to restore. If you want one colour to survive a drain, key it in `hueCurves` rather than draining globally and painting it back.
|
||||
This is not cosmetic. A global `saturation: -0.9` in `adjust` runs *before* `secondaries`, so a hue-keyed selection that tries to hold one color back finds it already desaturated and has nothing to restore. If you want one color to survive a drain, key it in `hueCurves` rather than draining globally and painting it back.
|
||||
|
||||
## Grading qualifies by value, never by position
|
||||
|
||||
@@ -43,9 +43,10 @@ The most useful thing grading does is not a look. It is protecting one part of t
|
||||
|
||||
### Grade the room, protect the face
|
||||
|
||||
> Take the talking-head clip and separate the subject from the room. Leave the person photographic — a gentle skin-softening pass and about a third of a stop of extra exposure, nothing that reads as an effect on skin. Grade the room behind them instead: across the four seconds bring up a halftone screen so the space resolves into small coloured dots, and let a restrained bloom build alongside it so the windows lift. Both start at zero so the shot opens ungraded.
|
||||
> Take the talking-head clip and separate the subject from the room. Leave the person photographic — a gentle skin-softening pass and about a third of a stop of extra exposure, nothing that reads as an effect on skin. Grade the room behind them instead: across the four seconds bring up a halftone screen so the space resolves into small colored dots, and let a restrained bloom build alongside it so the windows lift. Both start at zero so the shot opens ungraded.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-matte-separation-b0ef8e73.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-matte-separation-b0ef8e73.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*The room takes the halftone screen and the bloom; the subject takes nothing but a skin-soft pass and a third of a stop.*
|
||||
|
||||
Two traps here. Use the **original clip** as the background plate, not a subject-removed plate — that plate is a hole where the subject was, and a feathered cutout over it gives a dark rim. And if your cutout ships premultiplied alpha, the browser composites it as straight, multiplying edge pixels twice and producing a black outline; rebuild it with `ffmpeg alphamerge` from the original plus its matte.
|
||||
|
||||
@@ -53,7 +54,8 @@ Two traps here. Use the **original clip** as the background plate, not a subject
|
||||
|
||||
> Matte the subject off the plate, then redact just their face — the rest of them and the room behind both stay completely untouched. Hold pixelation constant at about half strength for the whole shot: no ramp, no fade-up. A redaction that animates on reads as an effect; one that is simply on reads as policy. Size the redaction generously so it takes in the hairline, ears and jaw rather than sitting tight on the features.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-redaction-engaging-ec781f26.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-redaction-engaging-ec781f26.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*Face pixelated, body and room untouched — the region is a `clip-path` on a third layer, not a payload setting.*
|
||||
|
||||
The region comes from a `clip-path` on a *third* layer — a second copy of the cutout carrying the grade, stacked over an ungraded copy. Because the graded layer **is** the cutout, the ellipse can overshoot the head without touching the room; there is nothing outside the silhouette to paint. Size it generously rather than tightly.
|
||||
|
||||
@@ -69,11 +71,13 @@ Three ways to take the image apart, each saying something different. Pixelation
|
||||
|
||||
> Degrade the picture into a screen over four seconds. Ramp dithering from clean up to 0.85 at mid pattern size, so continuous tone breaks into discrete quantised levels. It should read as a display failing, not as a filter being applied.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-signal-loss-babe88ef.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-signal-loss-babe88ef.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*Dither ramping from clean to 0.85 — continuous tone breaking into discrete levels.*
|
||||
|
||||
> Blow the highlights out over four seconds. Ramp bloom from nothing all the way to 3 — well past a tasteful highlight lift — on a wide radius, so light spills out of the windows and progressively swallows the frame. I want to see the top of the range, not a subtle glow.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-bloom-out-11531968.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-bloom-out-11531968.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*Bloom driven to 3, well past a highlight lift, until the light swallows the frame.*
|
||||
|
||||
<Warning>
|
||||
Bloom is the one control that will fool your instruments. Pushed hard it looks blown out while measuring as *less* clipped than the ungraded source — the haze is halation spreading light, not clipping. No clipping metric catches it. Judge bloom at 1:1, never from a thumbnail.
|
||||
@@ -81,29 +85,32 @@ Three ways to take the image apart, each saying something different. Pixelation
|
||||
|
||||
### Painterly, without mush
|
||||
|
||||
> Turn the shot into a painting over four seconds without turning it to mush. Ramp a Kuwahara filter from nothing to full — mid radius, fairly high sharpness so edges stay crisp, and pull the saturation back a little so it reads as brushwork rather than as a filter. Boundaries stay defined while flat areas smooth into strokes. Pick a subject with dense colour and dense edges; the effect has nothing to preserve on flat skin or a soft-focus background.
|
||||
> Turn the shot into a painting over four seconds without turning it to mush. Ramp a Kuwahara filter from nothing to full — mid radius, fairly high sharpness so edges stay crisp, and pull the saturation back a little so it reads as brushwork rather than as a filter. Boundaries stay defined while flat areas smooth into strokes. Pick a subject with dense color and dense edges; the effect has nothing to preserve on flat skin or a soft-focus background.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-painterly-ffd5c0f9.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-painterly-ffd5c0f9.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*Kuwahara at full strength, on a subject with enough edges to be worth preserving.*
|
||||
|
||||
---
|
||||
|
||||
## Print and colour
|
||||
## Print and color
|
||||
|
||||
### Two inks
|
||||
|
||||
> Take the poster and print it in two inks only: a near-black navy and a warm cream, at mid dot size, like a two-colour press run. Everything collapses to those two colours. Bring it up across the four seconds from the untouched poster rather than cutting straight to it. Give it the exact hex values rather than a named palette.
|
||||
> Take the poster and print it in two inks only: a near-black navy and a warm cream, at mid dot size, like a two-color press run. Everything collapses to those two colors. Bring it up across the four seconds from the untouched poster rather than cutting straight to it. Give it the exact hex values rather than a named palette.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-two-ink-press-3c5662f1.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-two-ink-press-3c5662f1.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*Ten hue families collapsing to three. Dense type is the harshest test of a two-ink reduction.*
|
||||
|
||||
Type is the harshest test of a two-ink reduction — dense small copy either survives the dot screen or turns to mud, and you can see which at a glance. Note the payload takes an explicit hex array; a named palette id is rejected.
|
||||
|
||||
### Hold one colour, drain the rest
|
||||
### Hold one color, drain the rest
|
||||
|
||||
> A single red apple on a teal backdrop. Hold the apple's colour and drain everything else — key off hue and collapse saturation everywhere outside the reds, so the backdrop goes fully neutral grey while the apple stays exactly as saturated as it was. Use a hue-vs-saturation curve rather than a global desaturation with the apple keyed back in: global saturation runs first in the pipeline and would kill the apple before the key ever sees it. Keep a generous skirt on the band so the apple's shadowed side doesn't clip grey.
|
||||
> A single red apple on a teal backdrop. Hold the apple's color and drain everything else — key off hue and collapse saturation everywhere outside the reds, so the backdrop goes fully neutral grey while the apple stays exactly as saturated as it was. Use a hue-vs-saturation curve rather than a global desaturation with the apple keyed back in: global saturation runs first in the pipeline and would kill the apple before the key ever sees it. Keep a generous skirt on the band so the apple's shadowed side doesn't clip grey.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-brand-spotlight-5ebe45bf.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-brand-spotlight-5ebe45bf.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*The backdrop drains to neutral grey; the apple holds its saturation exactly.*
|
||||
|
||||
Three things have to be true of the subject, and each one killed an earlier attempt at this shot. It must be **inanimate** — the grade desaturates everything outside the band, and on a person that means a grey, corpse-like face. It must be a **single** subject — a still life of mixed produce is full of colour, but half the items fall outside the band and grey out, so it reads as a filter misfiring rather than one colour deliberately held. And the surround must **carry** colour: against a neutral grey backdrop the grade would desaturate grey to grey and do nothing at all.
|
||||
Three things have to be true of the subject, and each one killed an earlier attempt at this shot. It must be **inanimate** — the grade desaturates everything outside the band, and on a person that means a grey, corpse-like face. It must be a **single** subject — a still life of mixed produce is full of color, but half the items fall outside the band and grey out, so it reads as a filter misfiring rather than one color deliberately held. And the surround must **carry** color: against a neutral grey backdrop the grade would desaturate grey to grey and do nothing at all.
|
||||
|
||||
---
|
||||
|
||||
@@ -123,13 +130,15 @@ The rolling wave is `tapeTracking` and `tapeDamage`. Static interlacing is `scan
|
||||
|
||||
> Make it look like a worn VHS tape. Not one artefact — layer them: strong tape damage with tracking error, a little noise, mid tape speed, scanlines, and noticeable chroma bleed. Any one of these alone reads as a filter; together they read as a failing signal.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-tape-degradation-6050228f.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-tape-degradation-6050228f.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*Six tape artefacts at once — any one of them alone reads as a filter.*
|
||||
|
||||
### Tube
|
||||
|
||||
> Make this look like it is being displayed on an old CRT television, not like it came off a worn tape. Bow the geometry with barrel curvature so the straight lines curve and the corners pull inward, lay scanlines across it at a fairly fine pitch, add phosphor bleed and enough chromatic aberration to give visible RGB fringing at the edges. Bleed and scanlines want to sit near the top of their range — bleed is subtle even at 0.9. Curvature and chromatic aberration are the exceptions: both read strongly, so hold curvature around half and keep the aberration modest, or the tube turns into a fisheye novelty. Grade the tone as well as the geometry: crush the shadows and blacks, lift the highlights and whites, nudge saturation up, and add a restrained bloom — a CRT has no true black and lets its top end halate. Add grain and a vignette. Use a test card or something with dead-straight lines: curvature is invisible on organic subject matter.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-crt-broadcast-b64dc1a8.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-crt-broadcast-b64dc1a8.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*Geometry bowed, scanlines laid over it, tone crushed — a tube rather than a filter on a clean image.*
|
||||
|
||||
The tonal work is doing as much as the geometry. Without crushed shadows and a halating top end, curvature and scanlines read as a filter laid over a clean digital image.
|
||||
|
||||
@@ -137,9 +146,10 @@ If you composite a subject into the shot, do it **before** grading. A CRT warps
|
||||
|
||||
### Camera
|
||||
|
||||
> Take the clip and give it a camcorder grade: crush the shadows and blacks, lift the highlights and whites, pull the saturation back slightly, and add a restrained bloom, film grain for noise, a vignette, interlacing lines, and a little RGB splitting at the edges. Crushed contrast with muted colour is what consumer tape actually looked like — crushed and punchy reads as a modern filter. For the split use chromatic aberration, which offsets the channels; chroma bleed is a different thing, a smear rather than a fringe. Keep the interlacing static — no tape tracking and no tape damage, because those produce a rolling horizontal wave that reads as a broken deck rather than as a camera.
|
||||
> Take the clip and give it a camcorder grade: crush the shadows and blacks, lift the highlights and whites, pull the saturation back slightly, and add a restrained bloom, film grain for noise, a vignette, interlacing lines, and a little RGB splitting at the edges. Crushed contrast with muted color is what consumer tape actually looked like — crushed and punchy reads as a modern filter. For the split use chromatic aberration, which offsets the channels; chroma bleed is a different thing, a smear rather than a fringe. Keep the interlacing static — no tape tracking and no tape damage, because those produce a rolling horizontal wave that reads as a broken deck rather than as a camera.
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-camcorder-overlay-18e80485.mp4" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/grade-camcorder-overlay-18e80485.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*The footage degrades; the HUD does not. It is an overlay, composed above the media canvas.*
|
||||
|
||||
The HUD in that shot is not part of the grade. It is a [`camcorder-hud`](/guides/media-overlays) registry block — real HTML, CSS, and a paused GSAP timeline composed *above* the media canvas. Grading never touches it, which is exactly what you want: burn a timestamp into the source pixels and it degrades with them; put it in an overlay and it stays crisp, editable, and timeline-driven while the footage falls apart underneath.
|
||||
|
||||
@@ -150,10 +160,10 @@ Nine properties expose a CSS custom property and tween directly — `ascii`, `bl
|
||||
Two caveats worth knowing before you promise a client a ramp:
|
||||
|
||||
- **`--hf-color-grading-intensity` does not scale a grade at render time.** A static `0.5` renders the same as `0`. Do not reach for it as a generic "ramp the whole look" dial.
|
||||
- **Everything else has no custom property.** Some of those can still be animated by rewriting the `data-color-grading` payload from the timeline — verified working for `halftone` and `twoInkPrint`. It is verified *not* working for `crtCurvature`, `scanlines`, `chromaBleed`, and `chromaticAberration`, where the same payload renders correctly applied statically but produces no change when driven through `setAttribute`. Measure the effect you intend to animate, and fall back to a static treatment if the ramp does not move.
|
||||
- **Everything else has no custom property.** Some of those can still be animated by rewriting the `data-color-grading` payload from the timeline, and some cannot — the verified list of which is which lives in the guide's [Animating a Grade](/guides/color-grading#animating-a-grade), so it only has to be maintained in one place. Measure the effect you intend to animate before you promise a ramp, and fall back to a static treatment if it does not move.
|
||||
|
||||
## Next steps
|
||||
|
||||
- [Colour Grading guide](/guides/color-grading) — the full contract, every key and bound
|
||||
- [Color Grading guide](/guides/color-grading) — the full contract, every key and bound
|
||||
- [Media Overlays](/guides/media-overlays) — HUD, flash, light leak, freeze-frame dressing
|
||||
- [VFX and liquid glass](/prompting/vfx-and-liquid-glass) — the canvas-pipeline end of the catalog
|
||||
|
||||
@@ -36,4 +36,4 @@ This is the clause in the [full capstone prompt](/prompting/capstone#the-full-pr
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/capstone-region-surface.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
*That clause, rendered — the region cut from the finished film.*
|
||||
|
||||
*Next: [VFX and liquid glass](/prompting/vfx-and-liquid-glass) — device mockups, frosted glass, and cinematic effects for when the layer on top needs its own spectacle.*
|
||||
*Next: [Color grading and film effects](/prompting/color-grading) — treat the media itself: tonal work, hue keys, print and analogue looks, and why the source matters more than the payload.*
|
||||
|
||||
Reference in New Issue
Block a user