Wikipedia : Dark mode (gadget)

submited by
Style Pass
2024-05-12 23:00:05

WikimediaUI Dark mode is a gadget for enabling dark mode in modern browsers, based on experimental work of Wikimedia Design team members Volker E. and Alex Hollender in support by volunteer MusikAnimal and others.

To enable, go to your gadget preferences, and enable the gadget "Dark mode toggle: Enable a toggle for using a light text on dark background color scheme".

You should now see a "Dark mode" switch at the top of pages. If you wish to enable/disable dark mode automatically based on your system colour scheme, add the following to your common.js page:

Most problems are due to how the gadget was implemented. It first inverts and colorshifts the entire page, and then tries to 'undo' the areas you do not want inverted, such as images. The benefit to this approach is that it takes care of dark mode everywhere, without having hundreds and hundreds of lines of codes for all the nooks and crannies of Wikipedia/MediaWiki that have their own styling. The downside are the problems listed.

For an example of what to expect on invert "dark mode" and double-invert "undo", see the question pictures in this StackOverflow question. The question uses the same invert and hue-rotate filter used by this extension.

Leave a Comment