Auto dark theme on websites according to system setting

not sure if I’m in the right Support category.
when setting dark theme in windows os this would force or get recognized by some sites which would change to dark too(twitter,youtube etc.)
is there a way to do the same in Manjaro KDE?

Thats a browser setting … for example in chrom* it would be --force-dark-mode flag I think.

1 Like

I edited the post title to better reflect the query. :wink:

1 Like

“Dark Reader” extension for all major browsers support this.

Search in it’s settings for “automation” option and “use system color scheme”:

It works perfectly in Gnome, but I’m sure that if Plasma has “night mode”, should also work there.


i think Firefox doesn’t have this option in about:config, i already looked for it and while some sites report it might have an entry, it doesn’t exist anymore.
and i’m almost certain that in windows it’s the OS dark theme that is responsible for letting sites know,since i didn’t touch any about:config entry in Firefox while i was still on windows.

I’m aware of this add-on,and while i have quit a few extensions,i prefer to limit their amount, especially if it’s just a cosmetic one.
i couldn’t find a a “night mode” in the KDE settings.

I’m sorry to hear that. It’s not that surprising there isn’t such a “night mode”, in Gnome you have to use a 3rd party extension for it anyway.

I remember there was a “night color” thingy for “redshifting” the color of the screen in KDE, but for sure it isn’t the same thing.

I see that there should be a config flag,, that should switch some UI and maybe webpages to dark versions when using Firefox’s dark theme. I’m not sure if this is similar to what you are looking for, and besides, it would still lack a way to automate it.

1 Like

i saw that browser setting,i’m not sure i want to create it.
i think I’ll wait a bit and see if there will be some advancement made in KDE or FF to implement this option natively.

Ok, suit yourself. But just know that you can create it, restart FF, see how it goes and if it doesn’t convince you, delete it or turn it to it’s previous value afterwards with a convenient button to the right. Just like that, there isn’t any dangers or drawbacks really with most of those configs.

1 Like

Since Firefox is a Gtk-based application, have you set a dark theme for Gtk applications?

I think in KDE the option is in Settings > Application Style > Configure GNOME/Gtk Application Style.

If you select a dark theme, like Breath-Dark for example, Firefox should pick up that setting and display certain websites in a dark mode.
The same goes for the “internal” pages of Firefox, like about:preferences or about:config for example.


Thank you all
@bill_t this solution worked.

1 Like

I am pretty sure thats not related …
You can have a dark gtk theme and that wont mean youtube is shown ‘dark’.
It will mean the window borders and menu items and such will be picked from the GTK theme … but it should not automatically affect the appearance of webpages.

Of course it doesnt … I specifically mentioned an example for chrome and chromium.

1 Like

twitter and YouTube are both shown in dark now,
so for me and what i was looking for, this worked,

Not combined with any other setting?
You just chose a dark gtk theme and nothing else and now those pages are in ‘dark mode’ ?
It certainly does not work that way on any system I have ever touched…
I just tested now and same results…

1 Like

since creating this thread I’ve changed nothing; neither in the system or FF.
the only setting that i had before hand that would only affect the top border of the browser(search bar,open tabs etc.)is the dark theme of FF itself.

It must be some fairly new Youtube setting, because where before you had the option to chose between light or dark theme in YT settings, now there also is a new option in “use device theme” that wasn’t there before. Both in my Windows and Gnome.

Ah, so its a youtube setting.
that makes much more sense.

Though … I still cant get it to work using Breeze, Breath-Dark, etc.
Owell … I’ll just assume its a security feature on my end :wink:

No, it’s a relatively new setting websites can set to match your system theme. Since you don’t use Android, you probably missed it. Android Police and 9to5Google also have it enabled, for example.

Right. And can be automatically leveraged through flag like
But it depends on the websites support … and in the case of one like youtube - it has a selector on the page.

a page with something like

@media (prefers-color-scheme: dark) {
body {
background-color: black;
color: white;

My experience has been that setting a dark GTK theme does not automatically set something like this on those supported pages.

1 Like

See what i did there? :wink:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.