Themes
Visual themes (GPU / Wingman).
Full notes from the app
Bundled wingman-dark / wingman-light / wingman-high-contrast, any ~/.kcode/themes/*.ron|*.json, plus plugin-bundled <plugin>/themes/*.ron|*.json (loaded after the user dir, so a user theme wins a name collision and the bundled names can never be shadowed; a blocklisted plugin's themes never load) — switch via /theme (picker on no-args, /theme <name> sets directly), the context menu's Theme action, or the palette's quick light / dark / high-contrast toggles. The first-run default is wingman-dark. A theme file authors eight token groups: colors (24 semantic tokens), type_scale (ui/title/mono/caption roles), spacing, radii, effects (ambient gradient, glass tile material, shadows, attention glow), emphasis (the alpha ramp behind hovers, selected rows, washes, text selection, scrims, and deemphasized — the level reasoning traces render at, 0.6 by default; raise it in a low-contrast theme, where 60% of an already-faint foreground can stop being legible), syntax (per-token code-highlight hues — override just keyword if that's all you want), and markdown (per-construct prose hues — body text, headings, links, inline code and the fenced-code fill, blockquotes, bold/italic, rules, list text and list markers, image glyph and alt text). Prose and code are separate groups on purpose: a theme can keep headings calm while code keywords pop. The last three are optional, so older theme files keep parsing. The simple authoring path is a partial theme: start the file with extends: "wingman-dark" (or wingman-light) and write only the tokens you change — down to a single field inside a group, e.g. type_scale: (mono: (size: 13.0)); a typo'd token name is a load error, not a silent no-op. Theme files live-reload: saving a file under ~/.kcode/themes/ — or under a plugin root — re-themes the window when the active theme changed and refreshes the /theme picker for added/removed files (a file that stops parsing drops from the picker but never blanks the window). Each dir is watched from launch when it exists; create it and relaunch once to start the loop.
4 entries · kcode 0.4.0
| Theme | Display name | Kind | Description |
|---|---|---|---|
| wingman-dark | Wingman Dark | dark | GPU default — a black-based neutral dark palette: near-black backgrounds and neutral off-white text, with blue reserved as the single accent (focus, info, links). Glass tiles and attention glow. |
| wingman-light | Wingman Light | light | GPU light theme — catppuccin-latte-inspired but every text hue darkened, because latte's own colours are authored for text on near-white and this theme's surfaces run down to #dce0e8: each one is pulled down in lightness, hue preserved, until it clears 4.5:1 against the darkest surface it can land on. Reasoning traces dim to 90% here rather than 60% (a light base has less headroom to dim into). Quick-toggle via palette. |
| wingman-high-contrast | Wingman High Contrast | dark | GPU high-contrast theme — every text token clears WCAG AAA (7:1) against every fill it can land on, where the other two bundled themes are held to the 4.5:1 AA floor, and the whole palette is audited at that bar. Pure-black page, pure-white text, and lighter hues than the house palette (a saturated red is the darkest hue at a given chroma, so the error colour sits at #ff8fa3). Reasoning traces dim to 75% rather than 60%, because dimming alone can push a passing token under the bar; resting tiles are opaque and unblurred, so the measured contrast is the contrast you get. Quick-toggle via palette ('Switch to high contrast'). |
| Theme token contract | Theme tokens | reference | A theme authors 24 colour tokens plus type/spacing/radii/effects/emphasis groups and two optional hue groups — syntax (code) and markdown (prose) — and the theme designer (Settings › Theme) exposes all 61 colourable leaves in five groups. Recently added: border_subtle, the faint divider used inside a panel (as against border, which outlines one); the optional selected_text, the ink for text on a solid fill (leave it unset and it is derived, knocked out to the page background); syntax.builtin and syntax.escape among the code hues; and the whole 14-token markdown group, which is what finally gives markdown headings a colour of their own and puts a fill behind a fenced code block. Every unset hue in either optional group renders exactly what it rendered before the group existed, so a theme opts in one key at a time. Every bundled theme is contrast-audited: body text and every hue painted as text must clear 4.5:1 against every surface it can land on, checked by a test rather than by eye. Session-group wash colours are not tokens of their own: they are derived from the theme's accent and status hues (Theme::group_swatch_ring), so recolouring those recolours the group clusters too. |