{"id":4431,"date":"2026-08-20T13:45:34","date_gmt":"2026-08-20T11:45:34","guid":{"rendered":"https:\/\/davidperezgar.com\/en\/?p=4431"},"modified":"2026-08-20T13:45:41","modified_gmt":"2026-08-20T11:45:41","slug":"a-different-color-by-project-in-vscode-the-trick-that-prevents-you-from-writing-on-the-wrong-repo","status":"publish","type":"post","link":"https:\/\/davidperezgar.com\/en\/blog\/a-different-color-by-project-in-vscode-the-trick-that-prevents-you-from-writing-on-the-wrong-repo\/","title":{"rendered":"A different color per project in VSCode: the trick that prevents you from typing in the wrong repo"},"content":{"rendered":"\n

When you’re working with AI, it’s common to have 3, 4, or 5 VSCode windows open at once… and end up writing in the wrong \ud83d\ude43 project<\/p>\n\n\n\n

Quick trick I passed on to the team this week:<\/p>\n\n\n\n

Customize the COLOR of each VSCode window according to the project.<\/p>\n\n\n\n

So, at a glance, you know where you are.<\/p>\n\n\n\n

\ud83d\udc49 How to do it:<\/p>\n\n\n\n

    \n
  1. In your project, create the .vscode\/settings.json file (or open Cmd + Shift + P and search for Preferences: Open Workspace Settings (JSON))<\/li>\n\n\n\n
  2. Add any colors you want for the title bar, activityBar, statusBar, etc.<\/li>\n\n\n\n
  3. Save and you’re done. That window will have YOUR visual identity.<\/li>\n<\/ol>\n\n\n\n

    If you work with workspaces, the colors go elsewhere<\/h2>\n\n\n\n

    I almost always open projects as workspace, i.e. with a .code-workspace file. And there’s a detail that can make you waste a while: workbench.colorCustomizations<\/code> it’s a window<\/em> scope option, not a resource one. Translated: in a multi-root workspace, VSCode ignores what you put in the .vscode\/settings.json<\/code> folder of each folder. The colors have to go in the workspace file itself, within the .\"settings\"<\/code><\/p>\n\n\n\n