vscode: intelligent live tint for palettes without a bundled theme - #3
Merged
Merged
Conversation
- new themesync/vscode_theme.py: base16 -> VS Code mapping (269 workbench keys, 24 token rules, 20 semantic rules), WCAG-checked foregrounds, dark/light aware, optional palette roles (accent, mauve, teal...) - vscode target: palettes bundled in xscriptor-themes keep their native theme (and the generated block is removed); any other palette gets the generated colorCustomizations over a matching Default Dark/Light Modern base, applied live by VS Code - extensions/themes/icons discovered at runtime: no palette list hardcoded - user-defined customization keys are never overwritten - scripts/check.sh validates the mapping for every palette (hex + contrast) - README target table + CHANGELOG entry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes VS Code and VS Code - Insiders follow any palette, including community/ and user-created ones, not only the 12 bundled in
xscriptor-themes.How it works (all dynamic, nothing palette-specific)
themesync/vscode_theme.py: semantic base16 → VS Code mapping. 269workbenchkeys (surfaces mixed bg→fg, selection from the accent, terminal ANSI 0-15, git decorations, diff, badges, charts...), 24 TextMate token rules and 20 semantic token rules. Every foreground is WCAG-checked (AA), dark/light is derived from luminance, and optional paletteroles(accent,mauve,teal,peach...) refine the accents.vscodetarget now decides per editor:xscriptor.xscriptor-themes-*extension): keep the handcrafted theme + icon theme, and remove the generated block;Default Dark/Light Modernby luminance) and inject a marker-delimited block withworkbench.colorCustomizations+editor.tokenColorCustomizations+editor.semanticTokenColorCustomizations. VS Code watchessettings.json, so it re-tints live in every window.Testing
scripts/check.sh: new step validates the mapping for all 137 palettes of the checkout (valid hex colors, WCAG AA contrast on every one; minimum measured 4.53), plus the existing compile/CLI smoke tests.3024(Insiders settings got the 269-key block,editor.background #090300), then switched back toxand the file was restored byte-identical to the backup.