Skip to content

Add Accent Color app - #1899

Merged
ryanmsartor merged 3 commits into
spruceUI:Developmentfrom
Dmussi:add-accent-color-app
Oct 22, 2026
Merged

ryanmsartor merged 3 commits into
spruceUI:Developmentfrom
Dmussi:add-accent-color-app

Conversation

@Dmussi

@Dmussi Dmussi commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Recolours the active theme's accent to any colour on the device: RGB sliders, hex entry (PyUI's on-screen keyboard) and presets with a live preview. On apply it rewrites the theme's accent images from templates and the accent keys in config*.json / igm.json, then spruce restarts PyUI with the new colours.

Themes opt in by shipping an accent/ folder (templates + manifest; format in README.txt), e.g. NextUI Style and NextUI Style Light in spruceUI/PyUI-Themes. Other themes get a message and are left untouched.

  • accent_engine.py: recolouring in plain Python (struct + zlib, no Pillow), so it runs on spruce's bundled Python on every device
  • start-up follows App/Cheevos: launch.sh mirrors the platform setup of App/PyUI/launch.sh; the app keeps its own log (Saves/spruce/accentcolor-.log) and PyUI state file
  • hidden in Simple Mode

Dmussi and others added 3 commits October 21, 2026 13:32
Recolours the active theme's accent to any colour on the device: RGB
sliders, hex entry (PyUI's on-screen keyboard) and presets with a live
preview. On apply it rewrites the theme's accent images from templates
and the accent keys in config*.json / igm.json, then spruce restarts
PyUI with the new colours.

Themes opt in by shipping an accent/ folder (templates + manifest; format
in README.txt), e.g. NextUI Style and NextUI Style Light in
spruceUI/PyUI-Themes. Other themes get a message and are left untouched.

- accent_engine.py: recolouring in plain Python (struct + zlib, no
  Pillow), so it runs on spruce's bundled Python on every device
- start-up follows App/Cheevos: launch.sh mirrors the platform setup of
  App/PyUI/launch.sh; the app keeps its own log
  (Saves/spruce/accentcolor-<platform>.log) and PyUI state file
- hidden in Simple Mode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The platform block came from App/Cheevos/launch.sh, which only covers
Miniloong, RGB30 and RGB20SX among the dArkMoss devices, so on V10,
A10Mini, XUMiniM and G350 the app showed "doesn't support this device"
and exited without recolouring. Cover the whole group like
App/PyUI/launch.sh does, and take the PyUI device name from
device_names (V10 -> POWKIDDY_V10, A10Mini -> A10MINI, ...), the same
source PyUI's launcher uses. Checked against device_names for all 25
platforms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a device whose resolution the theme doesn't ship (Powkiddy V10 runs
PyUI at 480x320), PyUI's theme patcher scales skin/ into
skin_<W>x<H> the first time the theme loads, and that copy is what the
menu draws. The app only rewrote the shipped folders, so on the V10
the accent never changed. After recolouring, rescale the accent images
into every patched skin_<W>x<H> folder with the patcher's sizing rules
(DefaultThemePatcher.scale_image) and PyUI's image utils.

Reproduced and verified in desktop.py at 480x320.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryanmsartor
ryanmsartor merged commit da52c54 into spruceUI:Development Oct 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants