Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set the sidebar color in vscode

Seems there are two colors to the sidebar in vscode light and dark. I am wanting to use the solarized light theme but have a dark sidebar. Is there a way to do this?

like image 577
haasdev Avatar asked Feb 09 '17 05:02

haasdev


People also ask

How do I change the color of the title bar in Visual Studio Code?

I did some tests, you can try to set Common elements > Main Window > Caption > Active/Inactive > Background option to change the title bar colors. And set Common elements > Tool Window > Caption > Active/Inactive > Background option to change the title bar colors of docked/undocked windows.

How do I change the color scheme in Visual Studio?

Here's how to change the color theme of the IDE frame and the tool windows in Visual Studio. On the menu bar, choose Tools > Options. In the options list, choose Environment > General. In the Color theme list, choose either the default Dark theme, the Light theme, the Blue theme, or the Blue (Extra Contrast) theme.


4 Answers

VS Code support workbench theming now, check this

Which means, in settings we can do as below to customise colours,

"workbench.colorCustomizations": {
   "sideBar.background": "#111111"
 }
like image 53
anoop Avatar answered Sep 22 '22 06:09

anoop


here is customization for each vs code window : it is helpful if you work on many project on different different vs code instanse

add a folder .vscode in your project root folder and add a file setting.json in .vscode folder then add your favorite style below example is the result of attache screenshot

{
    "workbench.colorCustomizations": {
        "activityBar.background": "#14b197",
        "statusBar.background": "#333"
      }
}

enter image description here

like image 21
Yusuf Khan Avatar answered Sep 21 '22 06:09

Yusuf Khan


Create a file named settings.json in the .vscode folder, and enter the below lines:

{
    "workbench.colorTheme": "Default Light+",
    "workbench.colorCustomizations": {
        "activityBar.background": "#e7e7e7",
        "activityBar.foreground": "#000000"
    }
}

The color value #e7e7e7 (for activity bar background) separates it from other parts so it stands out.

For global settings, add these lines in global settings.json file. My global settings.json looks as below:

{
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter.notebook.ipynb"
    },
    "python.pipenvPath": "C:\\Users\\abhi\\anaconda3\\envs",
    "workbench.colorTheme": "Default Light+",
    "workbench.colorCustomizations": {
        "activityBar.background": "#e7e7e7",
        "activityBar.foreground": "#000000"
    },
    "files.autoSave": "afterDelay",
    "git.confirmSync": false,
    "terminal.integrated.defaultProfile.windows": "Command Prompt"
}

The global settings.json can be found at:

Windows: %APPDATA%\Code\User\settings.json
mac:     $HOME/Library/Application Support/Code/User/settings.json
Linux:   $HOME/.config/Code/User/settings.json

Visual Studio Code will now look as below:

enter image description here

like image 6
Abhishek Kumar Dubey Avatar answered Sep 25 '22 06:09

Abhishek Kumar Dubey


Create a file named settings.json in the .vscode folder, and enter the below lines: you can change icons color in sidebar, comments, background color or even more as depicted in the attached picture.

enter image description here

{
  "workbench.colorCustomizations": {
    "activityBar.background": "#6ff304",
    "titleBar.activeBackground": "#69e024",
    "titleBar.activeForeground": "#5809ce",
    "icon.foreground": "#91ff00",
    "symbolIcon.colorForeground": "#ff0000",
    "icon.colorForeground": "#ff0000",
    "activityBar.inactiveForeground": "#524747"
  },

  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": [
          "comment",
          "comment.block.documentation",
          "comment.block.documentation.js",
          "comment.line.double-slash.js",
          "storage.type.class.jsdoc",
          "entity.name.type.instance.jsdoc",
          "variable.other.jsdoc",
          "punctuation.definition.comment",
          "punctuation.definition.comment.begin.documentation",
          "punctuation.definition.comment.end.documentation"
        ],
        "settings": {
          "fontStyle": "italic",
          "foreground": "#78108a"
        }
      }
    ]
  }
}
like image 6
Farbod Aprin Avatar answered Sep 25 '22 06:09

Farbod Aprin