Switch to Light Theme in VSCode: Step-by-Step Guide

Visual Studio Code, or VS Code, is a powerful, open-source code editor developed by Microsoft. It offers a rich set of features, including built-in Git support, intelligent code completion, and a highly customizable interface. One of the most convenient features of VS Code is its adaptability to different lighting conditions through its dark and light themes. If you find the default dark theme too intense or want to switch to a lighter environment, you've come to the right place. Let's guide you through the simple process of changing your VS Code theme from dark to light.

4 VS Code Themes Every Developer Should Try 💻
4 VS Code Themes Every Developer Should Try 💻

Before we dive into the steps, let's briefly discuss why switching themes can be beneficial. The light theme provides better visibility in well-lit environments, reducing eye strain. It also helps maintain focus by minimizing contrast, making it ideal for long coding sessions. Now, let's explore how to switch to the light theme in VS Code.

60+ VSCode themes you definitely need to try (dark + light)
60+ VSCode themes you definitely need to try (dark + light)

Adjusting VS Code Settings

VS Code offers a user-friendly interface for customization, allowing you to change your theme with ease. The settings can be accessed directly from the activity bar or via the command palette. Let's explore both methods.

the underrated vs code theme is displayed in this screenshot
the underrated vs code theme is displayed in this screenshot

Before we start, ensure you're in the Visual Studio Code editor and have the application open.

Using the Settings JSON File

VS Code Shortcuts Every Beginner Programmer Should Know
VS Code Shortcuts Every Beginner Programmer Should Know

The Settings JSON file is a powerful way to configure VS Code's behavior. You can access it directly or use the Workbench setting to adjust the theme. Here's how:

  • Open the settings by pressing Ctrl+, on Windows/Linux or Cmd+, on macOS.
  • Scroll down and click on Editor to expand the category.
  • Search for Color Theme and click on the dropdown menu to change the theme.
  • Select Light+ (default) or any other light theme you prefer, and the changes will take effect immediately.

Using the Command Palette

an image of a black background with white squares on it and the words visual tutor written below
an image of a black background with white squares on it and the words visual tutor written below

The command palette is a versatile tool that allows you to access various commands, including theme switching. Here's how to use it:

  • Press Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS to open the command palette.
  • Type Set Theme and select the command Set Color Theme to Light+ (default) or any other light theme you prefer.
  • The theme will change instantly, adjusting the editor's appearance to your selection.

Customizing and Exploring Light Themes

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

VS Code comes with a default light theme, but you can explore and customize various light themes to suit your preferences. Some popular light themes include Visual Studio Light, Default+ Light, and Light Modern. You can install and explore these themes using the Extensions Marketplace.

To access the Marketplace, click on the Extensions icon (🙿) on the left sidebar, then search for color themes. You'll find a variety of light themes you can install and use.

50 VS Code themes for 2020
50 VS Code themes for 2020
Vscode tips and tricks
Vscode tips and tricks
The Easiest Way to Add Dark Mode to Next.js and Tailwind
The Easiest Way to Add Dark Mode to Next.js and Tailwind
👨‍💻 Neon Glowing Effects| Creator Aashu
👨‍💻 Neon Glowing Effects| Creator Aashu
an image of a computer screen with some text on it and two other screens showing the same
an image of a computer screen with some text on it and two other screens showing the same
Day / Night Toggle Switch & Animated Logout Button with CSS & JS
Day / Night Toggle Switch & Animated Logout Button with CSS & JS
Dark Theme Switch Animation Using jQuery | CSS Dark Mode | Dark Mode UI
Dark Theme Switch Animation Using jQuery | CSS Dark Mode | Dark Mode UI
Dark (and Light) Mode
Dark (and Light) Mode
Visual Studio Code Tutorial for Beginners - Introduction
Visual Studio Code Tutorial for Beginners - Introduction

Manually Installing Light Themes

Some developers prefer creating their own light themes or using custom themes found online. If you've downloaded a .theme file, you can install it manually by following these steps:

  • Open the downloaded .theme file in VS Code.
  • Press Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS to open the command palette.
  • Type Install Theme and select the Install 'theme-name' from workspace command.
  • The theme will be installed and ready for use. Switch to it using the methods mentioned earlier.

Creating Your Own Light Theme

If you can't find a light theme that suits your preferences, consider creating one yourself. VS Code uses JSON for theme customization, making it easy to create and tweak themes. Here's a simplified guide to help you get started:

  1. Create a new folder and navigate to it in VS Code.
  2. Create a new file with the extension .theme and give it a name, like my-light-theme.theme.
  3. Open the file and add the following basic structure:
        {
            "name": "My Light Theme",
            "type": "dark",
            "extensions": [],
            "rules": [],
            "semanticHighlighting": true,
            "settings": {}
        }
        
  4. Edit the name property to change the theme's name.
  5. Adjust the rules array to modify colors and styles according to your preferences.
  6. Save the .theme file, close it, and then open it again to see your theme in action. If satisfied, install it using the command palette following the steps above.

Embracing a light theme in VS Code can greatly improve your coding experience, especially in well-lit environments. Experiment with different themes and customizations to find the perfect setting for you. Happy coding!