Tired of your Visual Studio Code (VSCode) workspace being too dim at night? Transitioning from daylight to darkness can strain your eyes, leading to discomfort and reduced productivity. VSCode's night mode, while useful for some, can be tough on the eyes after hours. Fortunately, you can turn off night mode with a simple adjustment. Let's explore how to do this.

Before we dive into the steps, ensure you have the latest version of VSCode. The process might vary slightly depending on your version, but the steps below should work for most users.

Enabling and Disabling Night Mode in VSCode
The night mode in VSCode is automatically triggered based on your local time. However, it's a toggleable feature, meaning you can manually enable or disable it. Let's understand how to manipulate this feature.

VSCode's settings.json file holds the key to controlling night mode. So, let's access this file to make the necessary changes.
Accessing settings.json

To open the settings.json file, follow these steps:
- Press
Ctrl + ,
orCmd + ,(on Mac)
on your keyboard to open the Settings menu. - In the search bar, type 'open settings (JSON)' and press Enter.
Modifying the Workbench

Once the settings.json file is open, you'll see a JSON file with various configurations. Here, we're interested in the 'workbench.colorCustomizations' section. This section controls the theme color, which, in turn, controls the night mode.
By default, VSCode automatically triggers night mode when the sun sets in your area. However, if you'd prefer to disable it, you can do so by adjusting the timepickr options or setting a fixed color. Let's explore both methods.
Method 1: Disabling Automatic Night Mode

To disable the automatic night mode, you can eliminate the 'timepickr' option entirely. Here's how:
- Find the 'workbench.colorCustomizations' section in the settings.json file.
- Delete the whole 'workbench.colorCustomizations' section, so it looks like this:
"workbench.colorCustomizations": {},









Method 2: Setting a Fixed Color Theme
If you prefer to have a fixed color theme instead of toggling between day and night modes, you can achieve this by setting a fixed color in the 'workbench.colorCustomizations' section. Here's how:
- Again, find the 'workbench.colorCustomizations' section in the settings.json file.
- Replace the entire section with the following:
"workbench.colorCustomizations": {
"activityBar.background": "#333333",
"activityBar.foreground": "#cccccc",
"activityBar.inactiveBackground": "#2b2b2b",
"activityBar.inactiveForeground": "#888888"
}
Conclusion: Your Custom VSCode Experience
Now that you can control VSCode's night mode, you can tailor your coding environment to your specific needs. Whether you prefer to disable automatic night mode or set a fixed color theme, VSCode offers customizability to enhance your coding experience.
Happy coding! Keep exploring VSCode's rich features to make your coding journey smoother and more enjoyable.