
How to Force Light Mode on Websites in Google Chrome on Linux
Struggling with dark mode websites when you prefer light themes? Many users want to force light mode in Google Chrome on Linux while keeping their operating system in dark mode. Here's a comprehensive guide to tackle this issue and regain control over your browsing experience.
The Problem: Chrome's Dark Mode Override
After updating Chrome, it may automatically follow the system's dark mode settings. This can be frustrating if you prefer a light theme for websites, regardless of your OS settings. Disabling the chrome://flags/#enable-force-dark
flag sometimes doesn't solve the problem.
Why Disable chrome://flags/#enable-force-dark
Isn't Enough
This flag only prevents Chrome from forcing dark mode. It doesn't actively enforce light mode, leaving websites to follow the system's theme.
Solution 1: Using gsettings
to Configure GTK Theme
This approach configures the GTK theme, affecting all applications that use it, including Chrome.
gsettings set org.gnome.desktop.interface color-scheme prefer-light
Understanding gsettings
gsettings
is a command-line tool that allows you to inspect and modify the configuration of GTK applications. The command specifies the schema (org.gnome.desktop.interface
), key (color-scheme
), and desired value (prefer-light
). Values can be default
, prefer-dark
, or prefer-light
.
Important Considerations Before Using gsettings
- System-Wide Change: This command affects all GTK applications, not just Chrome.
- Potential Conflicts: A recent update may override this behavior, so this solution may no longer work.
Solution 2: Chromium's Bug Tracker and Developer Tools Workaround
Currently, a direct, easy way to enforce light mode doesn't exist, it has been suggested as a feature in Chromium's bug tracker. However, there is a workaround you can try through developer tools.
Using Developer Tools
- Open Developer Tools (F12).
- Go to the "Styles" tab.
- Click the icon in the top right corner of the toolbar (it looks like a rectangle overlapping another).
- Choose
prefers-colors-scheme: light
. - You can create a shortcut for this in settings -> Shortcuts ->
Toggle CSS media feature prefers-color-scheme
.
Limitations of This Method
- Not Persistent: This change is temporary and resets when you reload the page.
- Manual Effort: You have to repeat this process for each new tab or website.
Solution 3: Chrome Themes From The Web Store
While themes primarily change the browser's interface, some users have found it useful in subtly influencing webpage appearance.
How to Install a Theme
- Visit the Chrome Web Store.
- Search for "Light Theme for Google Chrome" or "Default Light Theme".
- Click "Add to Chrome."
Important Considerations
- Limited Effect: This primarily changes the browser's UI, not necessarily website content.
- May Not Override Dark Mode: Websites may still force dark mode based on system settings.
Solution 4: Using the Dark Reader Extension
Dark Reader extension can also assist to solve this case.
How to configure the extension
- Visit the Chrome Web Store and get the Dark Reader extension
- Set the extension to "off" to deactive it.
- Restart Chrome to properly apply the settings.
Important Considerations
- Limited Effect: Some users have reported that this configuration might not have effect.
Conclusion
Forcing light mode on websites in Google Chrome on Linux requires understanding how Chrome interacts with system settings and CSS. While there's no perfect, persistent solution, the gsettings
method and developer tools workaround offer viable options. Keep an eye on Chromium's bug tracker for potential future updates that might simplify this process. If you prefer a more hands-off solution, experiment with Chrome themes or extensions like Dark Reader.