# svg-theme-system > Use when you need SVGs with selectable/customisable appearance: multiple palettes (WLILO / Obsidian / light), consistent typography, and repeatable agent-friendly pipelines. Triggers: svg theme, tokens, palette, WLILO, obsidian, design system, dark mode, diagram styling. - Author: metabench - Repository: metabench/copilot-dl-news - Version: 20260118094258 - Stars: 1 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/metabench/copilot-dl-news - Web: https://mule.run/skillshub/@@metabench/copilot-dl-news~svg-theme-system:20260118094258 --- --- name: svg-theme-system description: "Use when you need SVGs with selectable/customisable appearance: multiple palettes (WLILO / Obsidian / light), consistent typography, and repeatable agent-friendly pipelines. Triggers: svg theme, tokens, palette, WLILO, obsidian, design system, dark mode, diagram styling." --- # Skill: SVG Theme System (Selectable + Customisable) ## Scope This Skill is about making SVG output: - Consistent across diagrams - Easy for agents to generate and evolve - Themeable (multiple looks) without hand-editing 200 fills/strokes It covers two practical approaches: 1. **Build-time theming**: generate per-theme SVG variants (best for `` usage) 2. **Runtime theming**: CSS variables inside inline SVG (best for apps that inline SVG markup) ## Inputs - Target embedding mode: - **Static**: docs / `` / GitHub rendering - **Inline**: injected SVG markup (e.g., in a UI control) - Theme set (start with 2): - `obsidian` (industrial luxury) - `white-leather` (light) - Constraints: readability, contrast, collision-free ## Procedure ### 1) Pick your pipeline - If the SVG is loaded as a file (image/object): choose **build-time theming**. - If the SVG is inlined into HTML (string/DOM): runtime theming is possible. ### 2) Define a theme token schema (keep it small) Recommended minimum tokens: - `background.primary`, `background.secondary` - `surface.card`, `surface.border` - `text.primary`, `text.secondary`, `text.muted` - `accent.primary`, `accent.gold` - `status.active`, `status.planned`, `status.error`, `status.warning` - `strokeWidth.normal`, `strokeWidth.emphasis` - Typography: `font.sans`, `font.serif`, `font.mono` Rule: Don’t invent per-diagram tokens. Reuse the schema. ### 3) Apply the tokens consistently Use tokens for: - Fills (backgrounds/panels) - Strokes (borders/connectors) - Text colors - Highlight glows/filters Avoid: - Inline hardcoded colors repeated across nodes ### 4) Theme selection patterns #### A) Build-time (recommended default) - Generator accepts `--theme `. - It outputs `diagram..svg` (or into theme folders). This works everywhere, including `` embedding and markdown. #### B) Runtime (inline SVG only) - Put a `