Repository navigation
Add Accent Color app - #1899
Merged
Merged
Add Accent Color app#1899
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.