Howto: Stop Firefox Forcing Dark Mode on Websites

Here's how to stop Firefox automatically turning on dark-mode for websites.

In the address bar, type in about:config and press and accept the warning it gives you.

Add a new value ui.systemUsesDarkTheme set it to type number and pick one of the following:

  • 0 to tell websites to always use the light theme.
  • 1 to tell websites to always use the dark theme.
  • 2 to tell websites you have no preference.

Firefox config screen.

Dev Tools

If you want to do this on a one-off basis, open up the Dev Tools and click on the colour simulation icon to change your preferences.

Firefox dev tools. A pop up informs you that the colour scheme can be toggled.

It only works on a per-page basis and disappears when you refresh.


I use dark mode on my laptop and most of my Linux apps. But I find most websites' dark mode to look a bit rubbish. By setting ui.systemUsesDarkTheme to 0, I get a nice looking light theme, which I can switch to dark if I want using the website's own controls.

I wish Firefox implemented this as an easy to use toggle switch - but this method works if you're happy to fiddle around in Firefox's guts.

Share this post on…

2 thoughts on “Howto: Stop Firefox Forcing Dark Mode on Websites”

  1. says:

    @Edent i get migraines. And I hate dark mode.The irony here is that its not about light, its about contrast with the surrounding environment. Light mode is less hurtful to migraines during the day.


What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">

Discover more from Terence Eden’s Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading