[themes] Allow custom variables and references in workbench color customizations section
See original GitHub issueThis is a feature request to allow defining custom color variables in the workbench color customizations section. It would allow creating a small palette of colors and reusing it across the workbench color definitions, saving many repetitions and making it much easier to maintain.
This is just simple text substitution based on some naming convention like the .less @variable
convention. For example, see the @PaletteXXX
variables in the sample below:
"workbench.colorCustomizations": {
// custom colors
"@Palette000": "#FFFFFF",
"@Palette050": "#ECEFF1",
"@Palette100": "#CFD8DC",
"@Palette200": "#B0BEC5",
"@Palette300": "#90A4AE",
"@Palette700": "#455A64",
// input control
"input.background": "@Palette000",
"input.foreground": "@Palette700",
"input.placeholderForeground": "@Palette200",
"inputOption.activeBorder": "@Palette300",
"input.border": "@Palette100",
// list views
"list.activeSelectionBackground": "@Palette200",
"list.activeSelectionForeground": "@Palette700",
"list.inactiveSelectionBackground": "@Palette100",
"list.hoverBackground": "@Palette100",
"list.dropBackground": "@Palette100",
"list.focusBackground": "@Palette100",
Issue Analytics
- State:
- Created 5 years ago
- Reactions:19
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Theme Color | Visual Studio Code Extension API
Theme Color reference that lists all themable colors in Visual Studio ... You can customize your active Visual Studio Code color theme with...
Read more >Theme color reference - vscode-docs1 - Read the Docs
Theme Color Reference. You can customize your active Visual Studio Code color theme with the workbench.colorCustomizations user setting. { "workbench.
Read more >Creating and applying themes for embedded dashboards and ...
You can use themes to customize font family, text color, background color, button color, tile color, and other visual elements.
Read more >Customize syntax highlighting colors of data types and ...
I use Visual Studio Code 1.16 and custom theme (Actual) Obsidian. I try use featues editor.tokenColorCustomizations. Here is my custom user ...
Read more >Building a Visual Studio Code Theme with Style Dictionary
Style Dictionary is a great tool for creating VSCode color themes for a ... You can reference token aliases which allow you to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m expanding the issue to ‘variables’ and ‘references’
https://github.com/microsoft/vscode/issues/73069 was closed as dup of this although I believe the intention was different: to refer to colors already defined by themes, not to variables defined by the end user. For example, if I want the base foreground color for markdown emphasis, instead of the more colorful variants many themes apply, I would like to express “for this use what this theme defines as the default foreground color” without having to hardcode colors for each theme.