"Disable VSCode Night Mode: A Step-by-Step Guide"

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.

20 Best VSCode Themes for Programmers and Developers
20 Best VSCode Themes for Programmers and Developers

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.

an image of a web page with icons and buttons on the bottom right corner that says, vs code icons
an image of a web page with icons and buttons on the bottom right corner that says, vs code icons

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.

HELLO GUYS THIS IS MADE BY ME. If you're using it, then give credits
HELLO GUYS THIS IS MADE BY ME. If you're using it, then give credits

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

the cover of after dark, an app for windows and mac
the cover of after dark, an app for windows and mac

To open the settings.json file, follow these steps:

  • Press
    Ctrl + ,
    or
    Cmd + , (on Mac)
    on your keyboard to open the Settings menu.
  • In the search bar, type 'open settings (JSON)' and press Enter.

Modifying the Workbench

an image of a group of people on their cell phones with the caption take if you own
an image of a group of people on their cell phones with the caption take if you own

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

an image of a person walking in the grass with a sign above it that says, walk speed 100 % off
an image of a person walking in the grass with a sign above it that says, walk speed 100 % off

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": {},

VS Code Themes
VS Code Themes
HTML CSS Mode Change With JavaScript | Switch Light & Dark Mode
HTML CSS Mode Change With JavaScript | Switch Light & Dark Mode
ug
ug
Jugg Edit Qr Codes Vsp, Videostar Transitions Qr, Vsp Transition Qr Code, Star Overlays, Qr Code, Photo Editing, Coding
Jugg Edit Qr Codes Vsp, Videostar Transitions Qr, Vsp Transition Qr Code, Star Overlays, Qr Code, Photo Editing, Coding
Dev App Darkmode 👀
Dev App Darkmode 👀
the new secret code in 99 nights in the forest is now available for nintendo wii
the new secret code in 99 nights in the forest is now available for nintendo wii
Dark Or Light
Dark Or Light
an image of a computer screen with the program running on it's desktop monitor
an image of a computer screen with the program running on it's desktop monitor
How Can You Use VSCode Offline: A Comprehensive Guide - SmashingApps.com
How Can You Use VSCode Offline: A Comprehensive Guide - SmashingApps.com

  • Saving the settings.json file. Now, VSCode won't automatically enable night mode based on your local time.
  • 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"
      }

  • Note: You can modify the color codes to your preference.
  • Save the settings.json file. Now, VSCode will always use the color theme you've specified, regardless of the time.
  • 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.