This extension provides a status bar icon to quickly toggle between light/dark themes in VS Code.
This may be useful for anyone working under significantly changing background or reflected light levels.
If you are on Windows and would like to quickly toggle the whole system dark mode, you might be interested in this utility: Toggle Dark/Light Mode.
- A Toggle Theme command to switch between light/dark themes:
auto-dark-mode-windows.toggle
(see History for name choice!)
- Status bar icon to quickly perform the theme switch:
🌓︎
- Default hot-key:
Ctrl
+Alt
+Shift
+T
None.
No additional settings are provided by the extension itself.
-
Your choice of VS Code light/dark theme are used, you can adjust these by opening VS Code's settings with the command Preferences: Open Settings (UI), or through the menu: Code (on Mac) or File (on Windows/Linux) / Preferences / Settings, then:
- Workbench / Appearance / Preferred Light Color Theme (
workbench.preferredLightColorTheme
) - Workbench / Appearance / Preferred Dark Color Theme (
workbench.preferredDarkColorTheme
)
- Workbench / Appearance / Preferred Light Color Theme (
-
While the operating system's light/dark mode can be automatically tracked by enabling the following VS Code setting:
- Window / Auto Detect Color Scheme (
window.autoDetectColorScheme
)
...since VS Code V1.89 (April 2024), this prevents any temporary changes to the theme (which prevents toggling the theme), so this setting is disabled by the extension.
- Window / Auto Detect Color Scheme (
-
The status bar icon (
🌓︎
) can be hidden/shown by right-clicking the status bar and selecting Toggle Light/Dark Theme (Extension).
None.
See: Change Log
-
VS Code before 2020 could not synchronize the theme to match the system dark mode, nor could the theme quickly be changed between light/dark modes. This extension was previously titled Automatic Theme Switcher for Windows Dark Mode, which automatically switched between dark/light themes to match the Windows Dark Mode (on Windows 10 October 2018 Update or later), and used the settings
autoDarkMode.darkTheme
andautoDarkMode.lightTheme
. The extension was partly inspired by a similar extension for macOS Mojave: auto-dark-mode. -
VS Code V1.42 (January 2020) introduced a standard setting to synchronize with the system dark mode as a built-in, cross-platform feature: Window: Auto Detect Color Scheme (
window.autoDetectColorScheme
). This extension remained useful to quickly toggle between the standard light/dark theme preferences, regardless of the current system dark mode. -
VS Code V1.69 (June 2022) introduced a built-in command to quickly switch between themes: Preferences: Toggle between Light/Dark Themes (
workbench.action.toggleLightDarkThemes
). This extension remains useful for the status bar icon which acts as a shortcut for this feature. -
VS Code V1.89 (April 2024) changed the behavior so that when Window: Auto Detect Color Scheme (
window.autoDetectColorScheme
) is enabled, the Workbench: Color Theme (workbench.colorTheme
) setting is completely ignored. This means that you can no longer quickly toggle the theme while tracking the system color (at start and on change) -- not even with the built-in Preferences: Toggle between Light/Dark Themes (workbench.action.toggleLightDarkThemes
) command.