Expand description
Colour themes for the dashboard: the core’s palettes as CSS custom properties.
/style.css is written against var(--bg), var(--accent) … with the Default
theme as fallback; a <style> block from css (re-emitted by the live shard
whenever the theme select changes) overrides those variables.
Constants§
- CYBERPUNK_
CSS - Extra component styling for the Cyberpunk theme (cyberpunk.net look): yellow slab buttons with clipped corners, uppercase display type, hard-edged panels with a cut corner, neon glow and a faint scanline overlay.
- SYSTEM_
INDEX - Pseudo-index meaning “follow the system” (one past the last preset).
Functions§
- catalogue
- Every theme with its colours, for
/api/themes. - css
- CSS custom properties for the theme at
index(clamped), as one:root{…}rule. - name
- The name for a theme index (
SYSTEM_INDEX→ “System”; out of range is clamped). - names
- Theme names for the select: “System” first, then the presets in canonical order.
- resolve
- Pick the theme: an explicit, valid
requestedname wins, otherwisesaved."System"resolves toSYSTEM_INDEX. - save_
index - Remember
indexfor the TUI and GUI (best effort). - saved_
index - The saved theme (
SYSTEM_INDEXwhen following the system), shared with the TUI and GUI. - series_
var var(--sN)for a tool (pi,claude, …); the accent for anything else.