Toggle Dark / Light mode for any website directly clicking on a Bookmark. This is the most reliable code for applying Dark mode on Github as it inverts colors of the page instead of changing backgrounds and font colors.
- Works perfectly for Google products (Calendar, Docs, Sheet, Ads, Analytics, Tag Manager), Facebook, Instagram, etc.
- Works on any browser.
- Download and unzip the file
- Import
dark_mode_toggle.html
in your internet browser favorites. - OR copy the code of
dark_mode_toggle.js
file and paste it in a bookmark of your internet browser. - Click on the bookmark to toggle webpage dark/light mode.
To adapt contrast, change DARK_PERCENT
const with a number between 51 and 100.