← LeaderboardThe Skill Leaderboard

cracktro-theme

Design, add and verify a data-driven cracktro skin (palette, background pattern, chrome colours, typography, sound style) for the talk deck runtime.

Published by github ↗github/gh-aw

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

  1. 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 title and summary. The T toast, keyboard help and share dialog show them.

  2. Background. Override band themes in layers; later layers win:

    • band applies to every band.
    • dark or light applies by the band's own light flag.
    • bands: { <group>: {...} } applies to one band.

    Prefer dark over band, so the light concept bands (mindset, trust) keep their readable grey.

    Fields:

    FieldValue
    base[r,g,b] background fill
    pal4 "#rrggbb" drifting glow colours
    grid[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 #rrggbb for the first three (otherwise the default red wash is kept); shade and edge take #rrggbb[aa] and default to mid and outer with alpha.
    accent4 band header colours
    music, progthe band's music and its per-step shifts
  3. Chrome. tokens colours 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.

  4. Typography. type overlays the deck's TYPE:

    • Families, as CSS family lists that may use var(--mono): sans, display (titles and letters() headings) and mono (code and labels).
    • width sets the "wdth" axis.
    • weight, tracking, features and adjust style the body.
    • faces: [{ family, src, weight?, stretch?, style?, range?, display? }] is appended to the deck's faces. Ship any new font under docs/public/cracktro/fonts/ with its licence.

    Canvas text follows the skin through font(role).

  5. Sound. sound restyles the sfx synth:

    FieldEffect
    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
    musicfalse plays only the transition whoosh; a MUSIC key (such as title, process, finale) plays that theme for every band

    Grep const MUSIC = for the keys.

  6. Brand check (brand.md): neutral canvas, one accent hue, no rainbow; Mona Sans stays the default sans. Body text #e6edf3 needs at least 7:1 contrast and muted #8b949e at least 4:1 against the brightest glow overlap (base plus each pal colour). 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
    
  7. Add it to SKINS in deck.js. Entry order is the T cycle. The default is create({ skin }), else the first entry. Then run node --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

  1. Follow the Preview loop in ../cracktro/SKILL.md. Open http://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 .stage for each.
  2. Press T and Shift+T:
    • The toast shows the title and summary.
    • document.documentElement.dataset.skin matches the name.
    • The share dialog (S) has a Theme option whose link carries skin=<name>.
  3. These should resolve as designed:
    • getComputedStyle(document.documentElement).getPropertyValue("--display"), and the same for --sans, --mono and --ui-accent.
    • CracktroDeck.font("mono").
  4. Turn sound on (M) and move across bands: the music, wave and echo match the brief.
  5. 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).
  6. In the PR, attach the .stage captures for each skin (../cracktro/SKILL.md Pull requests).