Iterating-by-paint-over wasn't working. Going back to first principles: the brand IS the badge — full Element 1 mass, mark with its own internal padding, dark frame around it. That's what reads as "Backspace" on every other surface (dock, taskbar, favicon, apple- touch). The sidebar home tile should look the same. The earlier "ugly grey" complaint about Element 1 in the sidebar came down to one specific colour mismatch: the source SVG's #1d1d1b (warm near-black) sat next to the sidebar's #1a1a23 (cool near-black) and read as an off-grey rectangle. Fix: in the generator, do a string-replace `#1d1d1b → #000000` on app-icon.svg before rendering logo.png only — every other output (.icns, .ico, favicons, PWA) keeps the original brand `#1d1d1b`. Pure black against the sidebar's #1a1a23 reads as a deliberately darker tile, not a hue mismatch. Reverts the SpaceSidebar lavender-tile workaround: with the badge filling the tile via object-cover, the button's overflow-hidden + rounded-[20px → 13px] morph already animates the badge cleanly. backgroundStyle for type === 'dm' returns undefined again; deps trim back to what they were. Determinism gate verified — only logo.png changed (other 21 outputs byte-identical across two regen runs).
2.1 KiB
Icon Generator
Regenerates every brand artefact from assets/brand/*.svg:
- macOS
.icns, Windows.ico, Linux per-size PNGs (packages/desktop/build/) - Tray icons for all three platforms (
packages/desktop/resources/) - Web favicons, PWA manifest icons, maskable, in-app
logo.png(packages/web/public/icons/)
When to run
After changing any file under assets/brand/, or after bumping sharp,
png-to-ico, or png2icons in the root package.json. Commit the diff in
the same PR.
pnpm gen-icons
git status # review which files changed
git add packages/desktop/build/ packages/desktop/resources/ packages/web/public/icons/
git commit -m "chore: regenerate brand icons"
(Stage explicit paths rather than git add -A — the generator only writes to those three directories, and an unrelated working-tree change shouldn't accidentally land in a "regenerate icons" commit.)
Determinism
Output is byte-stable for a given lockfile. The same SVGs in produce the same PNG/ICO/ICNS bytes out, every time, on every OS — Sharp uses resvg internally and writes deterministic PNGs, png-to-ico and png2icons don't embed timestamps.
Caveat: byte-stability is not guaranteed across version bumps of
the three encoder deps. After a Renovate / dependabot PR upgrades any of
them, run pnpm gen-icons once and commit the resulting diff inside the
same PR. That follow-up commit isn't an artwork change — it's encoder
output drift, and gating it inside the dep PR keeps the artwork-change
git history clean.
Source SVGs
| Brand source | Drives |
|---|---|
assets/brand/app-icon.svg |
Every full app icon, all favicons, PWA, in-app logo.png (with #1d1d1b → #000 bg swap for sidebar contrast) |
assets/brand/mark.svg |
Win/Linux tray, PWA maskable inner mark |
assets/brand/mark-mono-dark.svg |
macOS menu-bar template (alpha + black) |
Artworks-Backspace/ is the design archive — never read by this script.