Visual Studio Code 0.9.0 and later
There’s an official documentation on how to add a custom theme.
You need a .tmtheme file for the theme you want to add. You can find existing files e.g. on GitHub, ColorSublime or you can define your own theme file (for example with tmTheme-Editor).
After finding a .tmtheme file you have two ways to create an extension based on it.
-
Using a Yeoman generator:
- Install node.js (if you haven’t already done)
- Install yo (if you haven’t already done) by executing
npm install -g yo - Install the Yo generator for code:
npm install -g generator-code - Run
yo codeand selectNew Color Theme - Follow the instructions (define the
.tmThemefile, theme name, ui theme etc.) - The generator creates a directory for your extension with the name of the theme in your current working directory.
-
Create the directory on your own:
- Create a directory with the name of your plugin (only lowercase letters). Let’s say we call it
mytheme. - Add a subfolder
themesand place the.tmThemefile inside of it - Create a file
package.jsoninside the root of the extension folder with content like this
{ "name": "theme-mytheme", "version": "0.0.1", "engines": { "vscode": ">=0.9.0-pre.1" }, "publisher": "me", "contributes": { "themes": [ { "label": "My Theme", "uiTheme": "vs-dark", // use "vs" to select the light UI theme "path": "./themes/mytheme.tmTheme" } ] } } - Create a directory with the name of your plugin (only lowercase letters). Let’s say we call it
Finally add your extension to Visual Studio Code
Copy the extension folder to the extension directory. This is:
-
on Windows
%USERPROFILE%\.vscode\extensions -
on Mac/Linux
$HOME/.vscode/extensions
Restart VSCode and select the new theme in File -> Preferences -> Color Theme
Visual Studio Code 0.8.0
It’s possible to add new themes in Visual Studio Code 0.8.0 (released for insiders on 2015-08-31 become an insider).
After installing VSCode 0.8.0 or higher do this to apply your own theme:
-
Download a
.tmThemefile or create your own (for example with tmTheme-Editor) -
Copy the
.tmThemefile to%CODEFOLDER%/resources/app/plugins/vs.theme.starterkit/themes -
Register the
.tmThemefile in%CODEFOLDER%/resources/app/plugins/vs.theme.starterkit/ticino.plugin.jsonby adding an entry for it like this:{ "id": "vs-theme-mynewtheme", // internal ID "label": "MyNewTheme", // displayed name for the theme "uiTheme": "vs-dark", // general UI appeareance ( // "vs" for light themes, // "vs-dark" for dark themes) "path": "./themes/myNewTheme.tmTheme" // file path }, -
Restart VSCode and select the new theme in
File -> Preferences -> Color Theme