--- name: serverbox-theme description: Make a ServerBox app theme — a `.fsbt` package (a folder with `manifest.toml`, optional icons, background and splash) — or an icon pack (icons only, chosen apart from the theme) from a description, a brand color or an existing color scheme, then validate it, pack it and share it. Use this whenever someone wants to create, port, tweak, fix, validate or publish a theme for ServerBox, including requests that never say ".fsbt" or "manifest", such as "make ServerBox look like Nord", "port my VS Code theme to the app", "a dark purple theme for server box", "why does my theme fail to install", "add custom tab icons", or "put my theme in the theme store". --- # ServerBox themes A ServerBox theme is a folder that becomes a `.fsbt` file (a ZIP) when shared: ``` my-theme/ manifest.toml required icons/tab_server.svg optional, one file per icon key background.png optional (.jpg/.jpeg) splash_logo.svg optional (.png/.jpg/.jpeg) ``` A theme changes the app's colors (the Material 3 ColorScheme, per light and dark), component styles (cards, tiles, buttons, inputs, search fields, the top bar, navigation, the side bar, segmented tabs, menus, dialogs, sheets, toasts, switches, sliders, progress, badges, chips, dividers, scrollbars), control density, corner radii, in-app icons, a background, and a launch splash. It does **not** change fonts, the launcher icon, or terminal/editor colors — say so if the request asks for those, rather than inventing fields: the installer rejects unknown tables and fields. An **icon pack** is the same kind of folder with `kind = "icons"` and only `[icons]` (`images`, `colors`): icons the user picks apart from the theme, drawn over whichever theme is in use — such as Files-window `file.` logos. Make one when the request is about icons alone and should work with any theme; it needs `[schema] min = 4`. See "Icon packs" in `references/manifest.md`. The format is strict on purpose: every field is checked, and a misspelled table is an error, not a no-op. So write the manifest from the reference, validate it with the script, and only then pack it. ## Workflow ### 1. Settle the basics Ask only for what cannot be decided from the request; propose defaults for the rest and say what they were. - **Name** and **id**. The id is stable and lowercase (`^[a-z0-9][a-z0-9._-]{0,63}$`); a reverse-DNS style such as `yourname.nord` avoids clashing with other people's themes. - **Modes**: `["dark"]`, `["light"]`, or both. A single mode locks the app to it while the theme is selected, so a theme that only makes sense dark should say `["dark"]`. Both modes means two palettes to get right. - **Where the colors come from**: a mood or a single brand color (use `seed`, optionally a few overrides), or an existing scheme to port (write full palettes — see step 3). - **Extras**: icons, background, splash. Each is optional and adds files and checks; don't add them unless asked. ### 2. Start from the template Copy `assets/manifest.template.toml` into a new folder as `manifest.toml` and fill it in. Its first line is a schema directive, so editors with Taplo/Even Better TOML/Tombi report mistakes as you type. For every field, its range and default, read `references/manifest.md`. Schema range: `[schema] min = 1, max = 4` unless the theme uses an SVG icon, `[icons.colors]`, or `[splash]`. These schema 2 features require `min = 2`, or an older app may install the theme but silently drop them. Schema 3 features require `min = 3`: components beyond card, tile, button, input, navigation, dialog, and sheet; button `minHeight`; `background.tile`; `[layout]`; or `[variants]`. Packages with more than 48 icons and all icon packs require schema 4 and `min = 4`. ### 3. Colors Colors are ARGB integers written as hex: `0xFF1E1E2E` (the `FF` is opacity). Palette values can also be named anywhere a component or icon color is expected (`backgroundColor = "surfaceContainer"`). - **Seed only**: `[colors] seed = 0xFF…` generates every role. Quick and always legible; the result is Material's interpretation of the color, not the color. - **Porting a scheme** (Nord, Dracula, Catppuccin, a VS Code or terminal theme, a brand palette): set the roles in `[colors.palette.dark]` / `.light` explicitly, so the app looks like the source. Read `references/porting.md` for which source color goes to which role, how to derive the surface ladder and containers, and how to handle a source with only one mode. For a VS Code theme JSON, `scripts/port_vscode.py` drafts the palette block. - Set `surfaceTint = 0x00000000` in a ported palette: Material otherwise tints elevated surfaces with `primary`, which shifts carefully chosen surfaces. - Keep text legible: the validator reports contrast for the text pairs a palette sets and warns under 4.5:1 (3:1 for outline). Fix warnings by moving the foreground's lightness, not by giving up the source's hue. Upstream themes often have muted comment/description colors under 4.5:1; lighten (dark) or darken (light) them for `onSurfaceVariant`. ### 4. Optional parts Only when asked; details in `references/manifest.md`. - **Icons**: `[icons.images]` maps a key (`"tab.server"`, `"nav.settings"`, `"file.py"`, …) to `icons/.svg|.png`; no other name is accepted. Files-window keys are `file.dir`, `file.link`, `file.default`, and `file.`. Icons are tinted one color — draw SVGs with `currentColor`. An SVG may not contain `