# Reference copies from the reference implementation

Byte-exact copies of the theme machinery from the `hydrogen-desktop` repo at commit `a4c764be` (theme pack v7.2.0, 2026-07-26). They are here because the living repo is private; this page is where every other implementer (Adom Desktop's re-brand, cloud containers, future apps) can actually read them.

| File | What it is |
|---|---|
| `gen-vscode-themes.mjs` | Generates all five VS Code themes from the app's CSS tokens. Themes are never hand-edited; this script is why the editor and the app cannot drift apart. Reads `src/routes/styles.css` in the HD repo; point it at `../tokens.css` semantics if you adapt it. |
| `vscode-theme-template.json` | The token-to-VS-Code-key mapping the generator projects through. Every color in it must resolve to a token or generation fails. |
| `install-brand-fonts.sh` | Installs the brand webfonts into code-server so the editor renders in brand type (fontconfig is not enough; the browser side needs `@font-face` served over HTTP). Verifies each face by HTTP fetch and wOF2 magic bytes. |
| `check-scheme-parity.sh` | Build guard: Adom Studio must be exactly Adom Studio Bright with `--bg`/`--surface` traded. Fails the build on any other divergence. |
| `check-installed-themes.sh` | Machine guard: the theme pack is actually installed and the live `workbench.colorTheme` resolves. Catches VS Code's silent fallback-to-light-theme failure. |
| `check-vscode-theme-names.sh` | Build guard: the theme labels the app pushes exist in the pack it ships. |

The installable artifacts these produce live one level up: [`../vscode/`](https://wiki.adom.inc/adom/adom-theme-system) (the generated pack) and [`../tokens.css`](https://wiki.adom.inc/api/pages/adom/adom-theme-system/files/tokens.css) (the extracted token blocks). If you change a token, regenerate; never edit the pack by hand.
