Themes
Visual themes (GPU / Wingman).
Full notes from the app
Bundled kcode-dark / kcode-light / kcode-high-contrast / kcode (mode-following) and the popular one-dark / dracula / tokyo-night / github-light / solarized-light, 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 kcode-dark. The first four are Wingman's own wingman-dark / wingman-light / wingman-high-contrast / wingman themes under kcode's names: the library keeps its names, the product speaks its own. A theme file authors eight token groups: colors (24 semantic tokens), type_scale (ui/title/mono/caption roles, each with a family, size, weight and line height that all apply), radii, sizes (the overlay widths and height), effects (ambient gradient, glass tile material, shadows), emphasis (the alpha ramp behind hovers, selected rows, washes, text selection, scrims, a filled button under the pointer (fill_hover), controls that can't be used now (disabled), marks one step back such as a stopped session's dot (quiet), 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: "kcode-dark" (or kcode-light, kcode-high-contrast, the mode-following kcode; Wingman's wingman-* names work too; to build on a popular theme, pick it and save a copy from the theme designer) and write only the tokens you change; a (dark: …, light: …) pair picks the light/dark mode's value over kcode, while over a base with one mode the file keeps that mode, as the base does, and a mode that differs from it is a load error, 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.
11 entries · kcode 0.6.5097
| Theme | Display name | Kind | Description |
|---|---|---|---|
| kcode-dark | kcode Dark | dark | GPU default, a black-based dark palette: near-black backgrounds and off-white text, with CRT green reserved as the single accent (focus, links). Glass tiles and attention glow. |
| kcode-light | kcode 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. |
| kcode-high-contrast | kcode 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'). |
| kcode | kcode (follow the mode) | dark | The house theme with no mode of its own: it resolves to kcode-dark or kcode-light from the mode cascade, the theme_mode setting (dark / light lock it) or, with theme_mode = "system", the OS appearance live. Pick it from /theme, Settings' Theme row or the palette's Follow system appearance to make the app follow macOS with no theme file to author. |
| one-dark | One Dark | dark | One Dark, from the One Dark Pro VS Code theme. Its red and purple are a little stronger than the original, so text clears 4.5:1 on every fill it lands on. Reasoning traces dim to 90% rather than 60%. |
| dracula | Dracula | dark | Dracula. Muted text is lighter than Dracula's comment colour and its red is a little softer, so text clears 4.5:1 on every fill it lands on. Code comments keep the original colour, about 3:1 on the page. |
| tokyo-night | Tokyo Night | dark | Tokyo Night. Muted text is a little lighter than the original, so it clears 4.5:1 on every fill it lands on, and its raised surfaces are the ones Tokyo Night Storm uses. Code comments keep the original colour. Reasoning traces dim to 75% rather than 60%. |
| github-light | GitHub Light | light | GitHub Light Default, from the GitHub VS Code theme. Muted text and its blue, purple, cyan, green and yellow are a shade darker than the original, so text clears 4.5:1 on every fill it lands on. Reasoning traces dim to 65% rather than 60%. |
| solarized-light | Solarized Light | light | Solarized Light. Its text is noticeably darker than the original, because Solarized's own colours fall under 4.5:1 on its pale fills: the body text is a mix of base01 and base02, and the accents keep their hue at a lower lightness. Code keeps the original colours, which are only 2.4:1 to 3.4:1 on the page, as Solarized is known for. Reasoning traces dim to 85% rather than 60%. |
| Theme credits | Theme credits | reference | The popular themes take their colours from these projects, each under the MIT licence. One Dark Pro: Copyright (c) 2013-2022 Binaryify. Dracula: Copyright (c) 2023 Dracula Theme. Tokyo Night: Copyright (c) 2018-present Enkia. GitHub Theme: Copyright (c) 2020 Primer. Solarized: Copyright (c) 2011 Ethan Schoonover. VS Code, for which hue goes on which kind of code in Solarized Light: Copyright (c) 2015 - present Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| Theme token contract | Theme tokens | reference | A theme authors 24 colour tokens plus type/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. |