Browser Dark Mode (Chrome and Firefox)
Dark Mode luckily has become a thing also in the non-unix world. Finally browser can be used with dark interfaces and websites can have alternative color schemes.
However, in other operating systems, there is a global toggle for dark mode, which also switches the browser into it. This is not the case on linux and unix systems.
Chromium based browsers
Chrome and Chromium starting with version 73 can be tought to start in dark mode:
chrome --enable-features=WebUIDarkMode --force-dark-mode
Then go to “chrome://settings/?search=themes” and switch the theme to “Classic”.
Firefox
Firefox got the dark mode in release 70.
- Go to “about:config”
- Enter “ui.systemUsesDarkTheme” into the search bar
- Click “Number” and then “+”
- Enter “1” and click the check mark
Right click on a free spot in the icon bar and select “customize”. At the bottom left of the screen, you can switch to a dark theme.
Note: If you’ve set privacy.resistFingerprinting to “true” the CSS dark mode switching won’t work. Kudus to @andinus@tilde.zone for figuring this out.
There you go, both browsers are in dark mode now. The UI should be dark and also websites that support the “@media (prefers-color-scheme: dark)” directive should make use of it.