hyperframes 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/cli.js +6106 -5758
- package/dist/hyperframe-runtime.js +3 -3
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +3 -3
- package/dist/skills/captions/SKILL.md +138 -0
- package/dist/skills/compose-video/SKILL.md +149 -0
- package/dist/skills/compose-video/house-style.md +129 -0
- package/dist/skills/compose-video/palettes/bold-energetic.md +14 -0
- package/dist/skills/compose-video/palettes/clean-corporate.md +14 -0
- package/dist/skills/compose-video/palettes/dark-premium.md +14 -0
- package/dist/skills/compose-video/palettes/jewel-rich.md +14 -0
- package/dist/skills/compose-video/palettes/monochrome.md +14 -0
- package/dist/skills/compose-video/palettes/nature-earth.md +14 -0
- package/dist/skills/compose-video/palettes/neon-electric.md +14 -0
- package/dist/skills/compose-video/palettes/pastel-soft.md +14 -0
- package/dist/skills/compose-video/palettes/warm-editorial.md +14 -0
- package/dist/skills/compose-video/patterns.md +118 -0
- package/dist/studio/assets/{index-B3C3oxF8.js → index-Df6fO-S6.js} +4 -4
- package/dist/studio/index.html +1 -1
- package/dist/templates/_shared/CLAUDE.md +50 -0
- package/dist/templates/blank/index.html +67 -42
- package/package.json +7 -2
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: captions
|
|
3
|
+
description: Build tone-adaptive captions from whisper transcripts. Detects script energy (hype, corporate, tutorial, storytelling, social) and applies matching typography, color, and animation. Supports per-word styling for brand names, ALL CAPS, numbers, and CTAs. Use when adding captions or subtitles to a HyperFrames composition.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Captions
|
|
7
|
+
|
|
8
|
+
Analyze the spoken content to determine caption style. If the user specifies a style, use that. Otherwise, detect tone from the transcript.
|
|
9
|
+
|
|
10
|
+
## Transcript Source
|
|
11
|
+
|
|
12
|
+
The project's `transcript.json` contains word-level timestamps from whisper.cpp (`--output-json-full` with `--dtw`):
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"transcription": [
|
|
17
|
+
{
|
|
18
|
+
"offsets": { "from": 0, "to": 5000 },
|
|
19
|
+
"text": " Hello world.",
|
|
20
|
+
"tokens": [
|
|
21
|
+
{ "text": " Hello", "offsets": { "from": 0, "to": 1000 }, "p": 0.98 },
|
|
22
|
+
{ "text": " world", "offsets": { "from": 1000, "to": 2000 }, "p": 0.95 }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Normalize tokens into a word array before grouping:
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
const words = [];
|
|
33
|
+
for (const segment of transcript.transcription) {
|
|
34
|
+
for (const token of segment.tokens || []) {
|
|
35
|
+
const text = token.text.trim();
|
|
36
|
+
if (!text) continue;
|
|
37
|
+
words.push({
|
|
38
|
+
text,
|
|
39
|
+
start: token.offsets.from / 1000,
|
|
40
|
+
end: token.offsets.to / 1000,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If no `transcript.json` exists, check for `.srt` or `.vtt` files. If no transcript is available, ask the user to provide one or run `hyperframes transcribe` (when available).
|
|
47
|
+
|
|
48
|
+
## Style Detection (Default — When No Style Is Specified)
|
|
49
|
+
|
|
50
|
+
Read the full transcript before choosing a style. The style comes from the content, not a template.
|
|
51
|
+
|
|
52
|
+
### Four Dimensions
|
|
53
|
+
|
|
54
|
+
**1. Visual feel** — the overall aesthetic personality:
|
|
55
|
+
|
|
56
|
+
- Corporate/professional scripts → clean, minimal, restrained
|
|
57
|
+
- Energetic/marketing scripts → bold, punchy, high-impact
|
|
58
|
+
- Storytelling/narrative scripts → elegant, warm, cinematic
|
|
59
|
+
- Technical/educational scripts → precise, high-contrast, structured
|
|
60
|
+
- Social media/casual scripts → playful, dynamic, friendly
|
|
61
|
+
|
|
62
|
+
**2. Color palette** — driven by the content's mood:
|
|
63
|
+
|
|
64
|
+
- Dark backgrounds with bright accents for high energy
|
|
65
|
+
- Muted/neutral tones for professional or calm content
|
|
66
|
+
- High contrast (white on black, black on white) for clarity
|
|
67
|
+
- One accent color for emphasis — not multiple
|
|
68
|
+
|
|
69
|
+
**3. Font mood** — typography character, not specific font names:
|
|
70
|
+
|
|
71
|
+
- Heavy/condensed for impact and energy
|
|
72
|
+
- Clean sans-serif for modern and professional
|
|
73
|
+
- Rounded for friendly and approachable
|
|
74
|
+
- Serif for elegance and storytelling
|
|
75
|
+
|
|
76
|
+
**4. Animation character** — how words enter and exit:
|
|
77
|
+
|
|
78
|
+
- Scale-pop/slam for punchy energy
|
|
79
|
+
- Gentle fade/slide for calm or professional
|
|
80
|
+
- Word-by-word reveal for emphasis
|
|
81
|
+
- Typewriter for technical or narrative pacing
|
|
82
|
+
|
|
83
|
+
## Per-Word Styling
|
|
84
|
+
|
|
85
|
+
Scan the script for words that deserve distinct visual treatment. Not every word is equal — some carry the message.
|
|
86
|
+
|
|
87
|
+
### What to Detect
|
|
88
|
+
|
|
89
|
+
- **Brand names / product names** — larger size, unique color, distinct entrance
|
|
90
|
+
- **ALL CAPS words** — the author emphasized them intentionally. Scale boost, flash, or accent color.
|
|
91
|
+
- **Numbers / statistics** — bold weight, accent color. Numbers are the payload in data-driven content.
|
|
92
|
+
- **Emotional keywords** — "incredible", "insane", "amazing", "revolutionary" → exaggerated animation (overshoot, bounce)
|
|
93
|
+
- **Proper nouns** — names of people, places, events → distinct accent or italic
|
|
94
|
+
- **Call-to-action phrases** — "sign up", "get started", "try it now" → highlight, underline, or color pop
|
|
95
|
+
|
|
96
|
+
### How to Apply
|
|
97
|
+
|
|
98
|
+
For each detected word, specify:
|
|
99
|
+
|
|
100
|
+
- Font size multiplier (e.g., 1.3x for emphasis, 1.5x for hero moments)
|
|
101
|
+
- Color override (specific hex value)
|
|
102
|
+
- Weight/style change (bolder, italic)
|
|
103
|
+
- Animation variant (overshoot entrance, glow pulse, scale pop)
|
|
104
|
+
|
|
105
|
+
## Script-to-Style Mapping
|
|
106
|
+
|
|
107
|
+
| Script tone | Font mood | Animation | Color | Size |
|
|
108
|
+
| -------------------- | ------------------------------------- | --------------------------------------- | -------------------------------------------- | -------------------- |
|
|
109
|
+
| Hype/launch | Heavy condensed, 800-900 weight | Scale-pop, back.out(1.7), fast 0.1-0.2s | Bright accent on dark (cyan, yellow, lime) | Large 72-96px |
|
|
110
|
+
| Corporate/pitch | Clean sans-serif, 600-700 weight | Fade + slide-up, power3.out, 0.3s | White/neutral on dark, single muted accent | Medium 56-72px |
|
|
111
|
+
| Tutorial/educational | Mono or clean sans, 500-600 weight | Typewriter or gentle fade, 0.4-0.5s | High contrast, minimal color | Medium 48-64px |
|
|
112
|
+
| Storytelling/brand | Serif or elegant sans, 400-500 weight | Slow fade, power2.out, 0.5-0.6s | Warm muted tones, low opacity (0.85-0.9) | Smaller 44-56px |
|
|
113
|
+
| Social/casual | Rounded sans, 700-800 weight | Bounce, elastic.out, word-by-word | Playful colors, colored backgrounds on pills | Medium-large 56-80px |
|
|
114
|
+
|
|
115
|
+
## Word Grouping by Tone
|
|
116
|
+
|
|
117
|
+
Group size affects pacing. Fast content needs fast caption turnover.
|
|
118
|
+
|
|
119
|
+
- **High energy:** 2-3 words per group. Quick turnover matches rapid delivery.
|
|
120
|
+
- **Conversational:** 3-5 words per group. Natural phrase length.
|
|
121
|
+
- **Measured/calm:** 4-6 words per group. Longer groups match slower pace.
|
|
122
|
+
|
|
123
|
+
Break groups on sentence boundaries (`.` `?` `!`), pauses (>150ms gap), or max word count — whichever comes first.
|
|
124
|
+
|
|
125
|
+
## Positioning
|
|
126
|
+
|
|
127
|
+
- **Landscape (1920x1080):** Bottom 80-120px, centered
|
|
128
|
+
- **Portrait (1080x1920):** Lower middle ~600-700px from bottom, centered
|
|
129
|
+
- Never cover the subject's face
|
|
130
|
+
- Use `position: absolute` — never relative (causes overflow)
|
|
131
|
+
- One caption group visible at a time
|
|
132
|
+
|
|
133
|
+
## Constraints
|
|
134
|
+
|
|
135
|
+
- **Deterministic.** No `Math.random()`, no `Date.now()`.
|
|
136
|
+
- **Sync to transcript timestamps.** Words appear when spoken.
|
|
137
|
+
- **One group visible at a time.** No overlapping caption groups.
|
|
138
|
+
- **Check project root** for font files before defaulting to Google Fonts.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compose-video
|
|
3
|
+
description: Create HyperFrames HTML video compositions. Use when asked to create a video, build an animation, make a composition, add a title card, or generate any HTML-based video content for HyperFrames.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Compose Video
|
|
7
|
+
|
|
8
|
+
HTML is the source of truth for video. A composition is an HTML file with `data-*` attributes for timing, a GSAP timeline for animation, and CSS for appearance. The framework handles clip visibility, media playback, and timeline sync.
|
|
9
|
+
|
|
10
|
+
## Approach
|
|
11
|
+
|
|
12
|
+
Before writing HTML, think at a high level:
|
|
13
|
+
|
|
14
|
+
1. **What** — what should the viewer experience? Identify the narrative arc, key moments, and emotional beats.
|
|
15
|
+
2. **Structure** — how many compositions, which are sub-compositions vs inline, what tracks carry what (video, audio, overlays, captions).
|
|
16
|
+
3. **Timing** — which clips drive the duration, where do transitions land, what's the pacing.
|
|
17
|
+
4. **Execute** — then implement using the rules below.
|
|
18
|
+
|
|
19
|
+
For small edits (fix a color, adjust timing, add one element), skip straight to the rules.
|
|
20
|
+
|
|
21
|
+
When no `visual-style.md` or animation direction is provided, follow [house-style.md](./house-style.md) for motion defaults, sizing, and color palettes.
|
|
22
|
+
|
|
23
|
+
## Data Attributes
|
|
24
|
+
|
|
25
|
+
### All Clips
|
|
26
|
+
|
|
27
|
+
| Attribute | Required | Values |
|
|
28
|
+
| ------------------ | --------------------------------- | ------------------------------------------------------ |
|
|
29
|
+
| `id` | Yes | Unique identifier |
|
|
30
|
+
| `data-start` | Yes | Seconds or clip ID reference (`"el-1"`, `"intro + 2"`) |
|
|
31
|
+
| `data-duration` | Required for img/div/compositions | Seconds. Video/audio defaults to media duration. |
|
|
32
|
+
| `data-track-index` | Yes | Integer. Same-track clips **cannot overlap**. |
|
|
33
|
+
| `data-media-start` | No | Trim offset into source (seconds) |
|
|
34
|
+
| `data-volume` | No | 0-1 (default 1) |
|
|
35
|
+
|
|
36
|
+
`data-track-index` does **not** affect visual layering — use CSS `z-index`.
|
|
37
|
+
|
|
38
|
+
### Composition Clips
|
|
39
|
+
|
|
40
|
+
| Attribute | Required | Values |
|
|
41
|
+
| ---------------------------- | -------- | -------------------------------------------- |
|
|
42
|
+
| `data-composition-id` | Yes | Unique composition ID |
|
|
43
|
+
| `data-duration` | Yes | Takes precedence over GSAP timeline duration |
|
|
44
|
+
| `data-width` / `data-height` | Yes | Pixel dimensions (1920x1080 or 1080x1920) |
|
|
45
|
+
| `data-composition-src` | No | Path to external HTML file |
|
|
46
|
+
|
|
47
|
+
## Composition Structure
|
|
48
|
+
|
|
49
|
+
Every composition is a `<template>` wrapping a `<div>` with `data-composition-id`. Each must include its own GSAP script and register its timeline:
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<template id="my-comp-template">
|
|
53
|
+
<div data-composition-id="my-comp" data-width="1920" data-height="1080">
|
|
54
|
+
<!-- content -->
|
|
55
|
+
<style>
|
|
56
|
+
[data-composition-id="my-comp"] {
|
|
57
|
+
/* scoped styles */
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
60
|
+
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
|
61
|
+
<script>
|
|
62
|
+
window.__timelines = window.__timelines || {};
|
|
63
|
+
const tl = gsap.timeline({ paused: true });
|
|
64
|
+
// tweens...
|
|
65
|
+
window.__timelines["my-comp"] = tl;
|
|
66
|
+
</script>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Load in root: `<div id="el-1" data-composition-id="my-comp" data-composition-src="compositions/my-comp.html" data-start="0" data-duration="10" data-track-index="1"></div>`
|
|
72
|
+
|
|
73
|
+
## Video and Audio
|
|
74
|
+
|
|
75
|
+
Video must be `muted playsinline`. Audio is always a separate `<audio>` element:
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<video
|
|
79
|
+
id="el-v"
|
|
80
|
+
data-start="0"
|
|
81
|
+
data-duration="30"
|
|
82
|
+
data-track-index="0"
|
|
83
|
+
src="video.mp4"
|
|
84
|
+
muted
|
|
85
|
+
playsinline
|
|
86
|
+
></video>
|
|
87
|
+
<audio
|
|
88
|
+
id="el-a"
|
|
89
|
+
data-start="0"
|
|
90
|
+
data-duration="30"
|
|
91
|
+
data-track-index="2"
|
|
92
|
+
src="video.mp4"
|
|
93
|
+
data-volume="1"
|
|
94
|
+
></audio>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Timeline Contract
|
|
98
|
+
|
|
99
|
+
- All timelines start `{ paused: true }` — the player controls playback
|
|
100
|
+
- Register every timeline: `window.__timelines["<composition-id>"] = tl`
|
|
101
|
+
- Framework auto-nests sub-timelines — do NOT manually add them
|
|
102
|
+
- Duration comes from `data-duration`, not from GSAP timeline length
|
|
103
|
+
- Never create empty tweens to set duration
|
|
104
|
+
|
|
105
|
+
## Rules (Non-Negotiable)
|
|
106
|
+
|
|
107
|
+
**Deterministic:** No `Math.random()`, `Date.now()`, or time-based logic. The renderer must produce identical output every time.
|
|
108
|
+
|
|
109
|
+
**GSAP:** Only animate visual properties (`opacity`, `x`, `y`, `scale`, `rotation`, `color`, `backgroundColor`, `borderRadius`, transforms). Do NOT animate `visibility`, `display`, or call `video.play()`/`audio.play()`.
|
|
110
|
+
|
|
111
|
+
**Animation conflicts:** Never animate the same property on the same element from multiple timelines simultaneously — causes flickering in headless renders.
|
|
112
|
+
|
|
113
|
+
**Never do:**
|
|
114
|
+
|
|
115
|
+
1. Forget `window.__timelines` registration
|
|
116
|
+
2. Use video for audio — always muted video + separate `<audio>`
|
|
117
|
+
3. Nest video inside a timed div — use a non-timed wrapper
|
|
118
|
+
4. Use `data-layer` (use `data-track-index`) or `data-end` (use `data-duration`)
|
|
119
|
+
5. Animate video element dimensions — animate a wrapper div
|
|
120
|
+
6. Call play/pause/seek on media — framework owns playback
|
|
121
|
+
7. Create a top-level container without `data-composition-id`
|
|
122
|
+
|
|
123
|
+
## Editing Existing Compositions
|
|
124
|
+
|
|
125
|
+
- Read the full composition first — match existing fonts, colors, animation patterns
|
|
126
|
+
- Only change what was requested — don't rewrite untouched sections
|
|
127
|
+
- Don't rewrite entire files for small changes
|
|
128
|
+
- Preserve timing of unrelated clips
|
|
129
|
+
|
|
130
|
+
## Typography and Assets
|
|
131
|
+
|
|
132
|
+
- Every composition loads its own fonts (`@import` or `@font-face` in `<style>`)
|
|
133
|
+
- Use `font-display: block` for local fonts — renderer needs fonts loaded before capturing
|
|
134
|
+
- Add `crossorigin="anonymous"` to media loaded from external URLs
|
|
135
|
+
- Minimum readable text: 20px landscape, 18px portrait
|
|
136
|
+
- All files (video, audio, fonts, images) live at the project root alongside `index.html`
|
|
137
|
+
- From sub-compositions, use `../` to reference root files
|
|
138
|
+
|
|
139
|
+
For PiP, title cards, and slide show patterns, see [patterns.md](./patterns.md).
|
|
140
|
+
|
|
141
|
+
## Output Checklist
|
|
142
|
+
|
|
143
|
+
- [ ] Every top-level container has `data-composition-id`
|
|
144
|
+
- [ ] Every composition has `data-width`, `data-height`, `data-duration`
|
|
145
|
+
- [ ] Compositions in own HTML files, loaded via `data-composition-src`
|
|
146
|
+
- [ ] `<template>` wrapper on sub-compositions
|
|
147
|
+
- [ ] `window.__timelines` registered for every composition
|
|
148
|
+
- [ ] 100% deterministic — no randomness
|
|
149
|
+
- [ ] Each composition includes GSAP: `<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>`
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# House Style
|
|
2
|
+
|
|
3
|
+
Defaults when no `visual-style.md` or animation direction is provided. These raise the floor — not a brand identity, just professional quality.
|
|
4
|
+
|
|
5
|
+
## Before Writing HTML
|
|
6
|
+
|
|
7
|
+
1. **Interpret the prompt.** Generate real content for the topic — don't use the prompt text as body copy. A recipe lists real ingredients. A stats dashboard shows the actual numbers given. A product showcase names real features and specs. A sci-fi HUD has actual crosshairs and readouts, not a heading that says "sci-fi HUD."
|
|
8
|
+
2. **Pick a palette.** First decide: does this content call for a light or dark canvas? Food, weddings, children, wellness, education, lifestyle, nature, and celebrations → light palette (Warm/Editorial, Clean/Corporate, Nature/Earth, Pastel/Soft). Tech, finance, cinema, nightlife, horror, gaming, and premium → dark palette. Then load the file and pick one palette. Declare your bg, fg, and accent colors before writing any code.
|
|
9
|
+
3. **Pick a typeface.** Don't reach for Sora, Space Grotesk, Outfit, Playfair Display, Cormorant Garamond, or Bodoni Moda — they're overused. Explore the full range of Google Fonts. Serif for editorial, mono for technical, display for impact, handwritten for personal.
|
|
10
|
+
4. **Pick your entrance patterns.** Plan how elements enter — never use the same entrance pattern twice in a composition.
|
|
11
|
+
|
|
12
|
+
## Motion
|
|
13
|
+
|
|
14
|
+
### Easing
|
|
15
|
+
|
|
16
|
+
Vary your eases. Don't use the same ease on more than 2 tweens in a composition. Pick from the full GSAP vocabulary:
|
|
17
|
+
|
|
18
|
+
`power1-4.in/out/inOut`, `back.out(1.4-2.5)`, `elastic.out(1, 0.3-0.5)`, `circ.out`, `expo.out`, `sine.inOut`, `steps(n)`
|
|
19
|
+
|
|
20
|
+
A few principles:
|
|
21
|
+
|
|
22
|
+
- Opacity fades should be gentle (`power1` or `none`) — don't draw attention to the fade itself
|
|
23
|
+
- Overshoot on scale or position feels alive — `back.out` or `elastic.out`
|
|
24
|
+
- Snappy moves want `expo.out` or `power4.out` — fast departure, hard stop
|
|
25
|
+
- Smooth arcs want `sine.inOut` or `circ.inOut` — no hard edges
|
|
26
|
+
|
|
27
|
+
### Timing
|
|
28
|
+
|
|
29
|
+
- **0.3–0.6s** for most moves. Shorter than you think.
|
|
30
|
+
- **Exits 2x faster** than entrances.
|
|
31
|
+
- **Nothing starts at t=0** — offset first animation 0.1–0.3s.
|
|
32
|
+
- **Overlap entries** — next element starts before previous finishes. Use GSAP position parameter: `tl.to(el, {...}, "-=0.15")`
|
|
33
|
+
- **Stagger with easing**, not uniform: `stagger: { each: 0.08, ease: "power2.in" }`
|
|
34
|
+
|
|
35
|
+
### Entrance Patterns
|
|
36
|
+
|
|
37
|
+
Never fade-in alone. Combine opacity with at least one transform. Never repeat the same entrance in a composition. Invent your own combinations — mix properties creatively:
|
|
38
|
+
|
|
39
|
+
- **Position** — x, y, or both (diagonal). Vary the axis and distance per element.
|
|
40
|
+
- **Scale** — from smaller or larger. Pair with overshoot easing.
|
|
41
|
+
- **Rotation** — small angles (3-12deg) feel intentional. Large angles (45-180deg) feel dramatic.
|
|
42
|
+
- **Clip path** — `inset()`, `circle()`, `polygon()`. Direction matters: left, right, top, center outward.
|
|
43
|
+
- **Blur + opacity** — `filter: blur(8px)` combined with opacity creates a focus-pull effect.
|
|
44
|
+
- **Letter spacing / word spacing** — for text, animate tracking from wide to tight or vice versa.
|
|
45
|
+
- **Skew** — `skewX` or `skewY` gives a motion-blur feeling without actual blur.
|
|
46
|
+
- **3D transforms** — `rotationX`, `rotationY` with `transformPerspective` for depth.
|
|
47
|
+
|
|
48
|
+
Don't copy the same combination across compositions. Each composition should feel like it has its own motion personality.
|
|
49
|
+
|
|
50
|
+
### Choreography
|
|
51
|
+
|
|
52
|
+
- **Combined transforms** — animate 2–3 properties together (position + scale, rotation + opacity), not one at a time.
|
|
53
|
+
- **Coordinated entry** — when a new element enters, existing elements react. Anchor moves, follower tracks.
|
|
54
|
+
- **Ambient motion** — keep the composition alive during holds. Don't default to zoom-in every time. Pick one per composition:
|
|
55
|
+
- Slow pan (x or y drift on a container)
|
|
56
|
+
- Subtle rotation (0.5–2deg over several seconds)
|
|
57
|
+
- Scale push or pull (zoom in OR out — both work)
|
|
58
|
+
- Parallax layers (background moves slower than foreground)
|
|
59
|
+
- Color/opacity shift on an accent element
|
|
60
|
+
- No ambient motion at all — stillness can be powerful
|
|
61
|
+
- **End with intention** — don't always zoom at the end. Options: snap to black, fade to stillness, final element snaps into place, a hard cut. Vary this across compositions.
|
|
62
|
+
|
|
63
|
+
### Scene Pacing
|
|
64
|
+
|
|
65
|
+
Structure compositions in three phases — don't front-load everything:
|
|
66
|
+
|
|
67
|
+
- **Build (0–30%)** — elements enter. Stagger arrivals so there's a sequence, not a simultaneous dump.
|
|
68
|
+
- **Breathe (30–70%)** — content is visible. Keep it alive with subtle motion: slow camera push, gentle drift, a color shift, a pulsing accent. Static holds feel dead.
|
|
69
|
+
- **Resolve (70–100%)** — elements exit or the composition punctuates. Exits are faster than entrances. End with intention — a final zoom, a fade to black, a snap to stillness.
|
|
70
|
+
|
|
71
|
+
Don't crowd the build phase. If you have 6 elements, let 2-3 enter, breathe, then bring in the rest. Layers of reveals beat a single wave.
|
|
72
|
+
|
|
73
|
+
## Sizing
|
|
74
|
+
|
|
75
|
+
- **Text scale contrast** — headings at 3–5x body size, not 1.5x. Big contrast reads as cinematic.
|
|
76
|
+
- **Element fill** — hero elements fill 60–80% of the frame. Don't leave them floating at 30%.
|
|
77
|
+
- **Travel distance** — entrance moves should cover 80–200px. Under 20px looks like a glitch.
|
|
78
|
+
- **Overshoot** — 5–10% overshoot reads as energy. Under 2% reads as a bug.
|
|
79
|
+
|
|
80
|
+
## Visual Depth
|
|
81
|
+
|
|
82
|
+
Flat single-color backgrounds look digital. Avoid pure solid backgrounds — add some visual layer to break the flatness. Options include gradients, subtle background shapes, texture, shadows on cards, or border accents. Pick what fits the content — not every composition needs the same treatment. A luxury product wants subtle gradients. A children's show wants bold shapes. A news graphic wants clean borders.
|
|
83
|
+
|
|
84
|
+
## Typography
|
|
85
|
+
|
|
86
|
+
Beyond choosing a typeface:
|
|
87
|
+
|
|
88
|
+
- **Weight contrast** — pair a heavy weight (700-900) headline with a light weight (300-400) body. Don't use the same weight on everything.
|
|
89
|
+
- **Case deliberately** — ALL CAPS for labels and short text (under 5 words). Sentence case for longer text. Don't uppercase paragraphs.
|
|
90
|
+
- **Tracking** — tight tracking (-0.02em) on large headlines. Normal or wide tracking on small labels.
|
|
91
|
+
- **One typeface, two weights** — don't mix typefaces unless you have a reason. One family at two weights creates more hierarchy than two families at one weight each.
|
|
92
|
+
|
|
93
|
+
## Anti-Defaults
|
|
94
|
+
|
|
95
|
+
Things the LLM reaches for that look generic. Do the opposite.
|
|
96
|
+
|
|
97
|
+
| Default | Instead |
|
|
98
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
99
|
+
| Inter / Roboto / system font | Pick a typeface with character — commit to it |
|
|
100
|
+
| `#f5f5f5` / `#333` / mid-gray | Go high contrast. Near-black or near-white, not the middle |
|
|
101
|
+
| Blue accent `#3b82f6` | No blue unless the user asks for blue |
|
|
102
|
+
| Everything centered, equal weight | One focal point per frame. Lead the eye somewhere |
|
|
103
|
+
| Uniform spacing | Tight clusters and open gaps. Vary deliberately |
|
|
104
|
+
| Same entrance on every element | Never repeat an entrance pattern in a composition |
|
|
105
|
+
| 1s duration on everything | 0.3–0.6s. Shorter than you think |
|
|
106
|
+
| `power2.out` on everything | Vary eases — no more than 2 independent tweens with the same ease (staggers are exempt) |
|
|
107
|
+
| Always dark background | Match the content: food, weddings, kids, wellness, education → light palette |
|
|
108
|
+
| Inventing colors per-element | Declare palette up front. Every element references it |
|
|
109
|
+
| Content in cards/containers | Place content directly on the canvas — separate with space and alignment, not box boundaries. Cards are a web pattern. Exception: dashboards, lower thirds, captions over footage |
|
|
110
|
+
| Hand-drawn SVG illustrations | Don't attempt to draw real-world objects (faces, buildings, food, animals) with SVG paths — they look crude. Use geometric shapes, lines, and abstract forms only. If the composition needs imagery, use text and typography to evoke it instead |
|
|
111
|
+
| Overlapping elements | Every element needs its own clear space. Check that positioned elements don't collide — stagger positions vertically with enough margin. Overlapping text is always ugly |
|
|
112
|
+
|
|
113
|
+
## Palettes
|
|
114
|
+
|
|
115
|
+
Before writing any HTML, declare your palette: one background, one foreground, one accent. Pick from a category below — don't invent colors. **Match palette to content** — don't default to dark. Children's content, food, weddings, wellness, education, and lifestyle content should typically use light or warm palettes.
|
|
116
|
+
|
|
117
|
+
| Category | Use for | File |
|
|
118
|
+
| ----------------- | --------------------------------------------- | ---------------------------------------------------------- |
|
|
119
|
+
| Bold / Energetic | Product launches, social media, announcements | [palettes/bold-energetic.md](palettes/bold-energetic.md) |
|
|
120
|
+
| Warm / Editorial | Storytelling, documentaries, case studies | [palettes/warm-editorial.md](palettes/warm-editorial.md) |
|
|
121
|
+
| Dark / Premium | Tech, finance, luxury, cinematic | [palettes/dark-premium.md](palettes/dark-premium.md) |
|
|
122
|
+
| Clean / Corporate | Explainers, tutorials, presentations | [palettes/clean-corporate.md](palettes/clean-corporate.md) |
|
|
123
|
+
| Nature / Earth | Sustainability, outdoor, organic | [palettes/nature-earth.md](palettes/nature-earth.md) |
|
|
124
|
+
| Neon / Electric | Gaming, tech, nightlife | [palettes/neon-electric.md](palettes/neon-electric.md) |
|
|
125
|
+
| Pastel / Soft | Fashion, beauty, lifestyle, wellness | [palettes/pastel-soft.md](palettes/pastel-soft.md) |
|
|
126
|
+
| Jewel / Rich | Luxury, events, sophisticated | [palettes/jewel-rich.md](palettes/jewel-rich.md) |
|
|
127
|
+
| Monochrome | Dramatic, typography-focused | [palettes/monochrome.md](palettes/monochrome.md) |
|
|
128
|
+
|
|
129
|
+
**Escape hatch:** If no category fits, derive from the color wheel — pick a base hue, take its complement or triadic, pull a dark from OKLCH lightness 15% and a light from 90%.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Bold / Energetic
|
|
2
|
+
|
|
3
|
+
Product launches, social media, announcements, high-energy content.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
#FFBE0B #FB5607 #FF006E #8338EC #3A86FF
|
|
7
|
+
#F72585 #7209B7 #3A0CA3 #4361EE #4CC9F0
|
|
8
|
+
#EF476F #FFD166 #06D6A0 #118AB2 #073B4C
|
|
9
|
+
#FF595E #FFCA3A #8AC926 #1982C4 #6A4C93
|
|
10
|
+
#9B5DE5 #F15BB5 #FEE440 #00BBF9 #00F5D4
|
|
11
|
+
#390099 #9E0059 #FF0054 #FF5400 #FFBD00
|
|
12
|
+
#3D348B #7678ED #F7B801 #F18701 #F35B04
|
|
13
|
+
#FFBC42 #D81159 #8F2D56 #218380 #73D2DE
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Clean / Corporate
|
|
2
|
+
|
|
3
|
+
Explainers, tutorials, presentations, professional content.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
#FFFCF2 #CCC5B9 #403D39 #252422 #EB5E28
|
|
7
|
+
#22223B #4A4E69 #9A8C98 #C9ADA7 #F2E9E4
|
|
8
|
+
#3D5A80 #98C1D9 #E0FBFC #EE6C4D #293241
|
|
9
|
+
#2B2D42 #8D99AE #EDF2F4 #EF233C #D90429
|
|
10
|
+
#353535 #3C6E71 #FFFFFF #D9D9D9 #284B63
|
|
11
|
+
#E7ECEF #274C77 #6096BA #A3CEF1 #8B8C89
|
|
12
|
+
#CFDBD5 #E8EDDF #F5CB5C #242423 #333533
|
|
13
|
+
#2F6690 #3A7CA5 #D9DCD6 #16425B #81C3D7
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Dark / Premium
|
|
2
|
+
|
|
3
|
+
Tech, finance, luxury, cinematic content.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
#000000 #14213D #FCA311 #E5E5E5 #FFFFFF
|
|
7
|
+
#000814 #001D3D #003566 #FFC300 #FFD60A
|
|
8
|
+
#0D1B2A #1B263B #415A77 #778DA9 #E0E1DD
|
|
9
|
+
#0D1321 #1D2D44 #3E5C76 #748CAB #F0EBD8
|
|
10
|
+
#011627 #FDFFFC #2EC4B6 #E71D36 #FF9F1C
|
|
11
|
+
#0B090A #161A1D #660708 #A4161A #E5383B
|
|
12
|
+
#001427 #708D81 #F4D58D #BF0603 #8D0801
|
|
13
|
+
#001524 #15616D #FFECD1 #FF7D00 #78290F
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Jewel / Rich
|
|
2
|
+
|
|
3
|
+
Luxury, events, sophisticated, high-end content.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
#5F0F40 #9A031E #FB8B24 #E36414 #0F4C5C
|
|
7
|
+
#780000 #C1121F #FDF0D5 #003049 #669BBC
|
|
8
|
+
#10002B #240046 #3C096C #5A189A #7B2CBF
|
|
9
|
+
#355070 #6D597A #B56576 #E56B6F #EAAC8B
|
|
10
|
+
#6F1D1B #BB9457 #432818 #99582A #FFE6A7
|
|
11
|
+
#231942 #5E548E #9F86C0 #BE95C4 #E0B1CB
|
|
12
|
+
#461220 #8C2F39 #B23A48 #FCB9B2 #FED0BB
|
|
13
|
+
#780116 #F7B538 #DB7C26 #D8572A #C32F27
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Monochrome
|
|
2
|
+
|
|
3
|
+
Dramatic, typography-focused, serious content.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
#F8F9FA #E9ECEF #DEE2E6 #CED4DA #ADB5BD #6C757D #495057 #343A40 #212529
|
|
7
|
+
#0466C8 #0353A4 #023E7D #002855 #001233
|
|
8
|
+
#012A4A #013A63 #01497C #2A6F97 #468FAF #89C2D9
|
|
9
|
+
#582F0E #7F4F24 #936639 #A68A64 #C2C5AA
|
|
10
|
+
#463F3A #8A817C #BCB8B1 #F4F3EE #E0AFA0
|
|
11
|
+
#03071E #370617 #6A040F #9D0208 #DC2F02 #F48C06 #FFBA08
|
|
12
|
+
#590D22 #800F2F #A4133C #FF4D6D #FF8FA3 #FFCCD5
|
|
13
|
+
#220901 #621708 #941B0C #BC3908 #F6AA1C
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Nature / Earth
|
|
2
|
+
|
|
3
|
+
Sustainability, outdoor, organic, wellness content.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
#606C38 #283618 #FEFAE0 #DDA15E #BC6C25
|
|
7
|
+
#DAD7CD #A3B18A #588157 #3A5A40 #344E41
|
|
8
|
+
#386641 #6A994E #A7C957 #F2E8CF #BC4749
|
|
9
|
+
#CAD2C5 #84A98C #52796F #354F52 #2F3E46
|
|
10
|
+
#F0EAD2 #DDE5B6 #ADC178 #A98467 #6C584C
|
|
11
|
+
#132A13 #31572C #4F772D #90A955 #ECF39E
|
|
12
|
+
#6B9080 #A4C3B2 #CCE3DE #EAF4F4 #F6FFF8
|
|
13
|
+
#233D4D #FE7F2D #FCCA46 #A1C181 #619B8A
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Neon / Electric
|
|
2
|
+
|
|
3
|
+
Gaming, tech, nightlife, Gen Z content.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
#F72585 #B5179E #7209B7 #560BAD #3A0CA3
|
|
7
|
+
#70D6FF #FF70A6 #FF9770 #FFD670 #E9FF70
|
|
8
|
+
#7400B8 #6930C3 #5E60CE #5390D9 #48BFE3
|
|
9
|
+
#0B132B #1C2541 #3A506B #5BC0BE #6FFFE9
|
|
10
|
+
#540D6E #EE4266 #FFD23F #3BCEAC #0EAD69
|
|
11
|
+
#2D00F7 #6A00F4 #8900F2 #A100F2 #F20089
|
|
12
|
+
#FF6D00 #FF7900 #FF8500 #FF9100 #240046
|
|
13
|
+
#BBFBFF #8DD8FF #4E71FF #5409DA
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Pastel / Soft
|
|
2
|
+
|
|
3
|
+
Fashion, beauty, lifestyle, wellness content.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
#CDB4DB #FFC8DD #FFAFCC #BDE0FE #A2D2FF
|
|
7
|
+
#CCD5AE #E9EDC9 #FEFAE0 #FAEDCD #D4A373
|
|
8
|
+
#FFD6FF #E7C6FF #C8B6FF #B8C0FF #BBD0FF
|
|
9
|
+
#FFA69E #FAF3DD #B8F2E6 #AED9E0 #5E6472
|
|
10
|
+
#EDAFB8 #F7E1D7 #DEDBD2 #B0C4B1 #4A5759
|
|
11
|
+
#555B6E #89B0AE #BEE3DB #FAF9F9 #FFD6BA
|
|
12
|
+
#006D77 #83C5BE #EDF6F9 #FFDDD2 #E29578
|
|
13
|
+
#0081A7 #00AFB9 #FDFCDC #FED9B7 #F07167
|
|
14
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Warm / Editorial
|
|
2
|
+
|
|
3
|
+
Storytelling, documentaries, case studies, narrative content.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
#264653 #2A9D8F #E9C46A #F4A261 #E76F51
|
|
7
|
+
#335C67 #FFF3B0 #E09F3E #9E2A2B #540B0E
|
|
8
|
+
#F4F1DE #E07A5F #3D405B #81B29A #F2CC8F
|
|
9
|
+
#F6BD60 #F7EDE2 #F5CAC3 #84A59D #F28482
|
|
10
|
+
#003049 #D62828 #F77F00 #FCBF49 #EAE2B7
|
|
11
|
+
#588B8B #FFFFFF #FFD5C2 #F28F3B #C8553D
|
|
12
|
+
#283D3B #197278 #EDDDD4 #C44536 #772E25
|
|
13
|
+
#0D3B66 #FAF0CA #F4D35E #EE964B #F95738
|
|
14
|
+
```
|