Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code: different color themes for different projects

I have 2 Visual Studio Code instances with two different projects.

Is there a way to make VS Code instances' themes different from each other depending on the project?

like image 468
edmond Avatar asked Jul 28 '18 13:07

edmond


People also ask

How do I get more color themes in Visual Studio?

The easiest way to install a Visual Studio theme is to navigate over to the Extensions option in the menu bar and select Manage Extensions. The next step is to select Visual Studio Marketplace under Online on the left panel. Once done, search for the theme you want and select it in the search results.

What is the best color theme for VS code?

Ayu is a popular VSCode theme and comes in three versions — dark, light, and mirage. This simple, bright, and elegant theme is appreciated by developers who code for long hours. It is one of the top-rated and most downloaded themes for Visual Studio Code.

Can I customize VSCode theme?

You can customize your active Visual Studio Code color theme with the workbench. colorCustomizations user setting. Note: If you want to use an existing color theme, see Color Themes where you'll learn how to set the active color theme through the Preferences: Color Theme dropdown (Ctrl+K Ctrl+T).

What are the different themes in Visual Studio Code?

Visual Studio Code has two kinds of themes: color themes and file icon themes. The editor comes with the following default themes that you don’t have to install and work out of the box: 4 light color themes. 9 dark color themes. 1 high contrast color theme. 2 file icon themes.

How do I change the colors in Visual Studio Code?

Color themes let you modify the colors in Visual Studio Code's user interface to suit your preferences and work environment. Selecting the Color Theme In VS Code, open the Color Theme picker with File > Preferences > Color Theme .

How do I install a color theme in Visual Studio?

Typing the “color theme” query into the search bar will return the available color themes you can install with a single click. The themes you can find in the Extensions bar are pulled from the Visual Studio Code Marketplace.

What are the best VS Code color themes?

Noctis Lux is one of the light themes of the family. It has a very light warm orange background, so it can be a great choice if you are looking for a light theme that is darker than white. Sandstorm is a darkish VS Code color theme that neither is based on the black and grey colors nor has the blue-y tint typical of dark UI themes.


Video Answer


3 Answers

// Specifies the color theme used in the workbench.

"workbench.colorTheme": "...……….",

If you put that into your "WORKSPACE SETTINGS" and not "USER SETTINGS" then you will get different themes for each workspace. When you open your setting Ctrl-, (that's a comma), then above the right-hand editor you will see "USER SETTINGS" and "WORKSPACE SETTINGS", chose the workspace settings and then click on the pencil icon to the left of the workbench.colortheme setting to change it.


If you don't want to change your whole theme just to quickly differentiate workspaces, try some combo of these settings in your WORKSPACE SETTINGS:

"workbench.colorCustomizations": {

  "activityBar.background": "#f00", 
  "titleBar.activeBackground": "#f00",
  "statusBar.background": "#f00"
}
like image 121
Mark Avatar answered Oct 16 '22 11:10

Mark


You can use a great VS Code extension called Peacock developed by John Papa.

like image 29
Prateek Kumar Dalbehera Avatar answered Oct 16 '22 10:10

Prateek Kumar Dalbehera


This worked for me. in each project folder create a .vscode subfolder if it doesn't already exist. In each folder create a separate settings.json file. in this file paste in the following:

for example my front end gives me a yellow title bar:

{
  "javascript.updateImportsOnFileMove.enabled": "always",
  "javascript.preferences.importModuleSpecifier": "non-relative",
  "workbench.colorCustomizations": {
    "titleBar.activeForeground": "#000",
    "titleBar.inactiveForeground": "#000000CC",
    "titleBar.activeBackground": "#ffc600",
    "titleBar.inactiveBackground": "#ffc600CC"
  },
  "appService.zipIgnorePattern": [
    "node_modules{,/**}",
    ".vscode{,/**}"
  ]
}

for backend i use this which gives me a red title bar:

{
  "workbench.colorCustomizations": {
    "titleBar.activeForeground": "#000",
    "titleBar.inactiveForeground": "#000000CC",
    "titleBar.activeBackground": "#eb2568",
    "titleBar.inactiveBackground": "#eb2568CC"
  },
  "appService.zipIgnorePattern": [
    "node_modules{,/**}",
    ".vscode{,/**}"
  ]
}

enter image description here

like image 10
JJ_Coder4Hire Avatar answered Oct 16 '22 12:10

JJ_Coder4Hire