Here I explain how to build a VS Code theme and publish it to the market place. Relatively straightforward and fun - customise your VS code theme to suit your taste.
This short guide will take you through the set up required to become a publisher, get a personal token and publish your theme.
Navigate to your terminal, run the following commands to enable the generator globally on your machine and then create a new project.
npm install -g yo generator-code
mkdir <file-name>
Go into your project and run the following command
cd <file-name>
yo sudo
You will be then asked the type of extension you want to create. Select New Color Theme
You then want to select the No, start fresh
option when creating a theme
And then you’ll be prompted to answer the following questions
The extension name
The identifier
A description
Publisher's name
The name that will be shown to users
Light/dark/high contrast theme? (select one)
Head into the theme
folder and open up <your-theme-name>
file.
In your file you will be able to see a range of different variables and colours, which you can change.
In order to see the changes made in the theme press f5 +fn
if you are on a mac and f5
if you are on windows.
Alternatively you can click on debug
on the menu bar and press the button next to the play button. You will see a new window open up called launch.json
.
Change the contents of launch.json
to the following:
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHpst",
"request": "launch",
"name": "Launch Extension",
"runetimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
Press the play
button and the Extension Development Window should open up. Open up a project you want to test the theme out on.
Be sure to test out what your theme looks like with various different languages.
There are many websites which will enable you to put together colours/palettes. A website I like to use from time to time is Khroma