
Let's create a custom VS Code theme in a few minutes!
2 December, 2022
4
4
0
Contributors
Getting started
•
•
1.
2.
Steps to follow
•
•
1. Create a folder and install the required packages
Create a folder and open it with VS code, and then simply go to the terminal inside VS Code and type the command - npm install yo generator-code
to install the required packages.
2. Setting up the file for editing
After the installation is completed let's get started running yo code
, here something like this -

How it looks like when you run 'yo code' in the terminal
•

•
•

This is how it will look
•
•

•

•
.jpg?type=webp)
The json file of the theme

3. Start the changes in your theme
- Go to
Run
->Start Debugging
-> will open and load a new VS Code window of default dark theme and then open up some files on it (if there isn't any open file already), which can help with better clarity whenever a color is changed.

debuger

the default theme
- Now if you change any color in the JSON file from earlier, you will notice it in effect immediately in the debugger VS Code window. eg: -

Just a demo
- This trick is can be the most helpful one, for this press
ctrl + shift + p
to open command palate and search for the commandInspect Editor Tokens and Scopes


The highlighted part can be used for search the po
- Now what you can do is with the cursor put the pointer at whichever code token color you want to change, in the above image I put the pointer at the
const
and the pop was giving the details of theconst
a variable property, and as you may observe I have highlighted one detail on this pop-up, at the foreground section "storage.type", this is the detail that will help us while searching for a specific token to change the color. So, now copy this text in the foreground section.
- Now go back to the previous VS Code window to edit the JSON, in that file type
ctrl + f
and paste there the copied property.

- Now, let's try and change this color to red,
.jpg?type=webp)
- However, doing this can take way too long time, but I have got a reference/tool for you made by Jesica, I bet you know her since she has a YouTube channel named
Coder Coder
, so what she did was, she made this tool

easy to use
How to use the theme on your local device!
- go to terminal
npm install --global vsce
- run
vsce package

- just type 'Y' in every field asked and required.
- lastly, just install your theme.
code --install-extension [your theme name]-0.0.1.vsix
reference from minecode --install-extension kawaii-theme-0.0.1.vsix
. BTW 0.0.1 is version so depending on your version number you give that number while installing.

the command

mine was kawaii theme whats your theme name share in the comment XD
If by any chance you ran into some problem you can contact me on Twitter. Happy coding folks.
vscode
howto
develate
theme