You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[themes] Allow custom variables and references in workbench color customizations section #56855
This 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:
changed the title [-]Allow custom variables in workbench color customizations section[/-][+][themes] Allow custom variables in workbench color customizations section[/+]on Aug 22, 2018
I'm really astonished how this could be forgotten. VS Code is great so far, but this is a real big oversight, imho.
Also not supporting HSL(A) is a pain. :D
This is something that Atom does really well. It allows creating variables as well as having other variables based on modifications to those. So for example, and overall blue theme could really just specify one blue color and lighter and darker elements would be based on that.
Would even take it further and say that this should also be modifiable by user settings. So for example I use the ayu-light theme and I don't like the orange highlighting, in my settings I would then override theme variables and tokens that are defined by the author:
#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.
Reacted by six, Ryan Thomas Lynch and Braden Wiggins
changed the title [-][themes] Allow custom variables in workbench color customizations section[/-][+][themes] Allow custom variables and references in workbench color customizations section[/+]on Jan 19, 2022
#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.
This was my motivation for coming here. For years I've wished for standardized tokens in workbench.colorCustomizations that we could reference and transform—using something like CSS relative colors—to make edits that adapt across themes.
Activity
[-]Allow custom variables in workbench color customizations section[/-][+][themes] Allow custom variables in workbench color customizations section[/+]aeschli commentedon Aug 22, 2018
Interesting idea!
angelhdzmultimedia commentedon Mar 18, 2019
Was this implemented or not yet? I also need to define custom variables in workspaces not to repeat myself.
kanlukasz commentedon Jun 6, 2019
It should be implemented.
Why:
An example of how the theme is created in Sublime Text:
runxel commentedon Dec 30, 2019
I'm really astonished how this could be forgotten. VS Code is great so far, but this is a real big oversight, imho.
Also not supporting HSL(A) is a pain. :D
videopilot commentedon Apr 8, 2020
This is something that Atom does really well. It allows creating variables as well as having other variables based on modifications to those. So for example, and overall blue theme could really just specify one blue color and lighter and darker elements would be based on that.
muuvmuuv commentedon Apr 15, 2020
Would even take it further and say that this should also be modifiable by user settings. So for example I use the ayu-light theme and I don't like the orange highlighting, in my settings I would then override theme variables and tokens that are defined by the author:
This would allow modifying themes differently, since VS Code now has a dark and night theme switch.
memeplex commentedon Oct 27, 2021
#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.
[-][themes] Allow custom variables in workbench color customizations section[/-][+][themes] Allow custom variables and references in workbench color customizations section[/+]aeschli commentedon Jan 19, 2022
I'm expanding the issue to 'variables' and 'references'
braebo commentedon Dec 15, 2025
This was my motivation for coming here. For years I've wished for standardized tokens in
workbench.colorCustomizationsthat we could reference and transform—using something like CSS relative colors—to make edits that adapt across themes.