phosphor-theme

Active design-token store with hot reload and matugen retint.

The live design-token store shells bind colors through instead of literals. PaletteStore keeps one token map per engine, shipping the canonical dark palette as its default and merging three input paths into the same map: JSON file load with a watcher, in-process applyTokens() pushes, and matugen subprocess output. It covers Material 3, ANSI 16, and brand-gradient tokens, exposes them through the Phosphor.Theme QML module and the IThemeService C++ surface, and renders {{token}} templates so external apps can be themed from the same palette. It is a leaf library with no Phosphor dependencies.

Full API →

Key types

PaletteStore
Concrete IThemeService with dark defaults, JSON parsing, file watching, QML singleton.
IThemeService
Abstract service: palette(), token(), loadFromFile(), applyTokens(), resetToDefaults().
MatugenRunner
QProcess wrapper around matugen; emits paletteReady(tokens, wallpaper) / failed.
TemplateEngine
Static renderer for {{token[.field]}} substitution with hex/rgb/channel variants.

Dependencies

See also

References