How to edit default dark theme for Visual Studio Code?
I'm using Windows 7 64-bit.
Is there a way to edit default dark theme in the Visual Studio Code? In %USERPROFILE%\.vscode
folder there are only themes from the extensions, while in installation path (I used default, C:\Program Files (x86)\Microsoft VS Code
) there are files of some standard themes in \resources\app\extensions
, like Kimbie Dark, Solarized Dark/Light or variants of Monokai, but there is no default dark theme.
But if after all there is a possibility to edit it, then which blocks of code are responsible for colour of member of object, member of pointer and name of class and structure in the C++ language?
Solution 1:
In VS code 'User Settings', you can edit visible colours using the following tags (this is a sample and there are much more tags):
"workbench.colorCustomizations": {
"list.inactiveSelectionBackground": "#C5DEF0",
"sideBar.background": "#F8F6F6",
"sideBar.foreground": "#000000",
"editor.background": "#FFFFFF",
"editor.foreground": "#000000",
"sideBarSectionHeader.background": "#CAC9C9",
"sideBarSectionHeader.foreground": "#000000",
"activityBar.border": "#FFFFFF",
"statusBar.background": "#102F97",
"scrollbarSlider.activeBackground": "#77D4CB",
"scrollbarSlider.hoverBackground": "#8CE6DA",
"badge.background": "#81CA91"
}
If you want to edit some C++ color tokens, use the following tag:
"editor.tokenColorCustomizations": {
"numbers": "#2247EB",
"comments": "#6D929C",
"functions": "#0D7C28"
}
Solution 2:
The file you are looking for is at,
Microsoft VS Code\resources\app\extensions\theme-defaults\themes
on Windows and search for filename dark_vs.json
to locate it on any other system.
Update:
With new versions of VSCode you don't need to hunt for the settings file to customize the theme. Now you can customize your color theme with the workbench.colorCustomizations
and editor.tokenColorCustomizations
user settings. Documentation on the matter can be found here.
Solution 3:
As far as the themes, VS Code is every bit as editable as Sublime. You can edit any of the default themes that come with VS code. You just have to know where to find the theme files.
Side note: I love the Monokai theme. However, all I wanted to change about it was the background. I don't like the dark grayish background. Instead, I think the contrast is WAY better with a solid black background. The code pops out much more.
Anyways, I hunted for the theme file and found it (in windows) at:
c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\theme-monokai\themes\
In that folder I found the Monokai.tmTheme file and modified the first background key as follows:
<key>background</key>
<string>#000000</string>
There are a few 'background' key in the theme file, make sure you edit the correct one. The one I edited was at the very top. Line 12 I think.
Solution 4:
The simplest way is to edit the user settings and customise workbench.colorCustomizations
If you want to make your theme
There is also the option modify the current theme which will copy the current theme settings and let you save it as a *.color-theme.json
JSON5 file