🐍 Python 3.10+
Enable Light Mode (Python)
Reverts File Explorer and other system surfaces to light mode. Applies the tweak via the stdlib winreg module.
set_light_mode.py
#!/usr/bin/env python3
"""
set_light_mode.py
Enable Light Mode.
Reverts File Explorer and other system surfaces to light mode.
Usage:
python set_light_mode.py
"""
import winreg
def main() -> None:
key = winreg.CreateKeyEx(
winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", 0, winreg.KEY_SET_VALUE
)
winreg.SetValueEx(key, "AppsUseLightTheme", 0, winreg.REG_DWORD, 1)
winreg.CloseKey(key)
print("Enable Light Mode applied.")
if __name__ == "__main__":
main()