Dark Mode Toggle

dark mode using inversion, double-hit Esc for toggle button

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
Alistair1231
Daily installs
0
Total installs
14
Ratings
0 0 0
Version
0.3.0
Created
2025-03-16
Updated
2025-06-30
Size
3.44 KB
License
GPL-3.0
Applies to
All sites

Dark Mode Toggle

I got frustrated with how complex and unreliable existing dark mode methods were, so I made a very simple one myself. It simply inverts the colors of the page, while keeping images and videos the same.

Double-Hit Esc to shortly display the toggle button. Dark Mode state is saved in window.localStorage.darkMode for persistence.

Style loads very early to avoid white flash.

Button:

Before:

After: