9

After upgrading Chrome to 114.0.5735.90, it now follows the system dark mode. I want to force websites opened in Google Chrome to use light mode while keeping the OS on dark mode. I've tried to disable chrome://flags/#enable-force-dark but not luck, it does nothing.

Destroy666
  • 12,350
Raftel
  • 101

4 Answers4

13

This fixed the issue for me in Ubuntu jammy (to be called in a terminal):

gsettings set org.gnome.desktop.interface color-scheme prefer-light

(edit) To further explain:

The tool gsettings allows to inspect and manipulate the configuration of GTK applications (such as Google Chrome). An entry in the configuration belongs to a schema (here: org.gnome.desktop.interface), has a key (here: color-schema) and an appropriate value (here, one of: default, prefer-dark, prefer-light). The setting will affect all applications that consume this configuration entry.

See also: https://wiki.gnome.org/HowDoI/GSettings

oec
  • 131
4

It is currently impossible to achieve this easily. chrome://flags/#enable-force-dark only attempts to set prefers-color-scheme media option to dark, setting it to false only means it won't try to enforce it, not that'll try to enforce light theme.

This is suggested as a feature in Chromium's bug tracker, which doesn't seem to have much progress - you can bump it with good reasoning why this option should exist.

As a workaround, the best thing you can do is launch dev tools (F12), then under Styles tab (where you check CSS properties) click on this icon in top right corner of toolbar: icon and choose prefers-colors-scheme: light. That isn't preserved ofc, though. You can also set this to a shortcut after clicking cog icon (settings) -> Shortcuts -> Toggle CSS media feature prefers-color-scheme.

Destroy666
  • 12,350
1

chrome://flags/#enable-force-dark is Auto Dark Mode for Web Contents, not for the browser interface itself.

You can install a Theme from the Chrome Web Store to change the theme back. Something like Light Theme for Google Chrome or Default Light Theme.

Yisroel Tech
  • 13,220
0

Dark reader extension solved this issue for me. Now all apps including chrome on ubuntu are in dark theme, but websites are displayed in original colors. In extension I put it to "off" and now all works fine.

Mantas
  • 101