Preset window icons + golden Citrine accent #43

Merged
parkerhdavis merged 2 commits from preset-app-icons into main 2026-06-01 14:58:18 -06:00
parkerhdavis commented 2026-06-01 14:58:13 -06:00 (Migrated from github.com)

What

Picking an accent preset now swaps the running window's icon to a matching gem, and the Amber preset is replaced by a golden Citrine.

How

  • generate-icons.sh — a make_preset_icon helper recolors the gem (shape from the transparent source's alpha, painted the preset color, over a white rounded tile) and emits resources/icons/presets/<id>.png for the six presets. One 256px size; the OS scales.
  • main.rs — set_app_icon command maps a preset id to its embedded PNG (include_bytes!), decodes to RGBA via the image crate, and calls window.set_icon. Self-contained; no new capability (done from Rust).
  • useApplyAccent also calls setAppIcon, so the window icon swaps in lockstep with the CSS accent on boot and on every change.
  • Amber → Citrine: at hue 65 the amber gem read as a dark red-brown too close to garnet. Citrine is UI hue 90 (golden #956300) with a lightened gem (#9c7a0f) so it reads as true gold.

Affects the live window only (titlebar/taskbar, macOS dock); the installed launcher icon is baked at build time and unchanged.

Testing

tsc, Biome, full-repo lint, and cargo check pass. Generated icons inspected visually. Verified via make dev: picking a preset swaps the titlebar/taskbar icon and the choice persists; Citrine reads clearly golden and distinct from Garnet.

## What Picking an accent preset now swaps the running window's icon to a matching gem, and the Amber preset is replaced by a golden Citrine. ## How - `generate-icons.sh` — a `make_preset_icon` helper recolors the gem (shape from the transparent source's alpha, painted the preset color, over a white rounded tile) and emits `resources/icons/presets/<id>.png` for the six presets. One 256px size; the OS scales. - `main.rs` — `set_app_icon` command maps a preset id to its embedded PNG (`include_bytes!`), decodes to RGBA via the `image` crate, and calls `window.set_icon`. Self-contained; no new capability (done from Rust). - `useApplyAccent` also calls `setAppIcon`, so the window icon swaps in lockstep with the CSS accent on boot and on every change. - **Amber → Citrine**: at hue 65 the amber gem read as a dark red-brown too close to garnet. Citrine is UI hue 90 (golden `#956300`) with a lightened gem (`#9c7a0f`) so it reads as true gold. Affects the live window only (titlebar/taskbar, macOS dock); the installed launcher icon is baked at build time and unchanged. ## Testing `tsc`, Biome, full-repo lint, and `cargo check` pass. Generated icons inspected visually. Verified via `make dev`: picking a preset swaps the titlebar/taskbar icon and the choice persists; Citrine reads clearly golden and distinct from Garnet.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
parker/garnet!43
No description provided.