cracktro-theme
Design, add and verify a data-driven cracktro skin (palette, background pattern, chrome colours, typography, sound style) for the talk deck runtime.
Try your first task
A source-grounded starter task has not been verified for this skill yet.
SKILL.md
name: cracktro-themedescription: Design, add and verify a data-driven cracktro skin (palette, background pattern, chrome colours, typography, sound style) for the talk deck runtime.Cracktro theme (skin) design
A skin is data only: one entry in SKINS in docs/public/cracktro/deck.js (grep const SKINS = ), passed to CracktroDeck.create({ skins, skin, type, tokens }).
Viewers choose skins in three ways:
- T cycles forward and Shift+T back.
- A link chooses one with
?skin=<name>or#<id>&skin=<name>. - The last pick persists in
localStorage["aw-skin"].
Never add skin logic to runtime.js or to slide code. If a look needs a new knob, add it to the runtime as data, with a default that keeps today's look. Then type it in runtime.d.ts and document it here.
First load ../cracktro/SKILL.md and ../cracktro/brand.md. ../cracktro/mechanics.md describes the band THEMEs that skins overlay. Everything is public (../cracktro/content-rules.md).
Steps
-
Brief. Write one line on the room or mood (bright projector, print, retro, calm kiosk) and what changes. Pick a short lowercase name (the URL value), plus a
titleandsummary. The T toast, keyboard help and share dialog show them. -
Background. Override band themes in layers; later layers win:
bandapplies to every band.darkorlightapplies by the band's ownlightflag.bands: { <group>: {...} }applies to one band.
Prefer
darkoverband, so the light concept bands (mindset, trust) keep their readable grey.Fields:
Field Value base[r,g,b]background fillpal4 "#rrggbb"drifting glow coloursgrid[r,g,b,minorAlpha,majorAlpha]anggrid angle in degrees cellgrid cell in px (min 12); a major line every 5 cells pattern"grid","dots","cross","lines"or"none"glowglow strength: 0 hides the glows, 1 is normal driftglow speed multiplier: 0 holds them still wash["#inner", "#mid", "#outer", shade?, edge?]recolours the red security wash. Use#rrggbbfor the first three (otherwise the default red wash is kept);shadeandedgetake#rrggbb[aa]and default tomidandouterwith alpha.accent4 band header colours music,progthe band's music and its per-step shifts -
Chrome.
tokenscolours the nav buttons, dots, minimap and dialogs:--ui-accent,--ui-bg,--ui-line,--ui-fg,--ui-hi,--ui-dot. Any other--*token is also set on:root, so deck CSS can read it. Keep one accent hue. -
Typography.
typeoverlays the deck'sTYPE:- Families, as CSS family lists that may use
var(--mono):sans,display(titles andletters()headings) andmono(code and labels). widthsets the"wdth"axis.weight,tracking,featuresandadjuststyle the body.faces: [{ family, src, weight?, stretch?, style?, range?, display? }]is appended to the deck's faces. Ship any new font underdocs/public/cracktro/fonts/with its licence.
Canvas text follows the skin through
font(role). - Families, as CSS family lists that may use
-
Sound.
soundrestyles thesfxsynth:Field Effect waveoscillator type for tones and pads bellwave of the bell partials detunepad spread multiplier; 0 is none transposeshift in semitones echodelay multiplier; 0 is dry volumemaster volume multiplier musicfalseplays only the transition whoosh; aMUSICkey (such astitle,process,finale) plays that theme for every bandGrep
const MUSIC =for the keys. -
Brand check (
brand.md): neutral canvas, one accent hue, no rainbow; Mona Sans stays the default sans. Body text#e6edf3needs at least 7:1 contrast and muted#8b949eat least 4:1 against the brightest glow overlap (baseplus eachpalcolour). Never use red and green alone for opposing states. To check contrast, pass background colours as arguments:node -e 'const L=h=>{const c=h.match(/\w\w/g).map(x=>parseInt(x,16)/255).map(v=>v<=.03928?v/12.92:((v+.055)/1.055)**2.4);return .2126*c[0]+.7152*c[1]+.0722*c[2]};const r=(a,b)=>{const[x,y]=[L(a),L(b)].sort((p,q)=>q-p);return((x+.05)/(y+.05)).toFixed(2)};for(const bg of process.argv.slice(1))console.log(bg,"text",r("e6edf3",bg),"muted",r("8b949e",bg))' 030a18 06285e 0b3166 -
Add it to
SKINSindeck.js. Entry order is the T cycle. The default iscreate({ skin }), else the first entry. Then runnode --check docs/public/cracktro/deck.js.
Example
paper: {
title: "Paper",
summary: "ink-blue dots, slow glows, softer music",
dark: { base: [10, 14, 22], pal: ["#0d2a4a", "#12233d", "#0a1a30", "#163556"], pattern: "dots", cell: 28, glow: 0.7, drift: 0.5 },
tokens: { "--ui-accent": "#79c0ff" },
type: { weight: 450, tracking: "0.005em" },
sound: { wave: "triangle", echo: 0.6, volume: 0.8 },
},
Verify
- Follow the Preview loop in
../cracktro/SKILL.md. Openhttp://127.0.0.1:4329/cracktro/?skin=<name>#security(dark band),#stop-manually-translating-intent-into-code(light band) and the title slide, and capture.stagefor each. - Press T and Shift+T:
- The toast shows the title and summary.
document.documentElement.dataset.skinmatches the name.- The share dialog (S) has a Theme option whose link carries
skin=<name>.
- These should resolve as designed:
getComputedStyle(document.documentElement).getPropertyValue("--display"), and the same for--sans,--monoand--ui-accent.CracktroDeck.font("mono").
- Turn sound on (M) and move across bands: the music, wave and echo match the brief.
- Run from
docs/:npm run check:cracktro.npx playwright test tests/talk.spec.ts -g "skin". The deck test cycles every skin, so it covers a new one.- If you changed
runtime.js, keep the perf guard green (../cracktro/perf.md).
- In the PR, attach the
.stagecaptures for each skin (../cracktro/SKILL.mdPull requests).