"Force Dark Mode for Web Contents" using command line switch(es)

1,509 views
Skip to first unread message

Yuri Konotopov

unread,
Jun 16, 2020, 5:06:04 AM6/16/20
to Chromium-discuss
I trying to enable dark mode for web content based on time of day.
However I can not enable it using command line switches.
Nothing of that works for me:

--dark --force-dark-mode --blink-settings=inversion_method=cielab_based,image_behavior=selective,text_lightness_threshold=150,background_lightness_threshold=205


Are there any possible way to enable it using command line switches?

Снимок экрана от 2020-06-14 09-17-12.png


Yuri Konotopov

unread,
Jul 7, 2020, 1:27:35 PM7/7/20
to Chromium-discuss
Anyone?

Nicolas Ouellet-payeur

unread,
Jul 7, 2020, 2:37:07 PM7/7/20
to ykono...@gmail.com, Chromium-discuss
Try --enable-features=WebUIDarkMode

On Tue, Jul 7, 2020 at 1:27 PM Yuri Konotopov <ykono...@gmail.com> wrote:
Anyone?

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Yuri Konotopov

unread,
Jul 7, 2020, 3:11:21 PM7/7/20
to Chromium-discuss, ykono...@gmail.com
Unfortunatelly, this doesn't works.
Still have white background and "Force Dark Mode for Web Contents" flag is in default state.



вторник, 7 июля 2020 г., 22:37:07 UTC+4 пользователь Nicolas Ouellet-payeur написал:
Try --enable-features=WebUIDarkMode

Lily Chen

unread,
Jul 7, 2020, 4:18:00 PM7/7/20
to ykono...@gmail.com, Chromium-discuss
Try --enable-features=WebContentsForceDark



And then you can force yourself into a particular group via command line using --force-fieldtrials: https://source.chromium.org/chromium/chromium/src/+/master:base/base_switches.cc;l=33-41;drc=12cd16ac3a46001b853793828f67e9cd6ffc7606 

You'll have to play around with the syntax (it's pretty tricky/annoying), but that should get you started.

--

Yuri Konotopov

unread,
Jul 8, 2020, 10:47:59 AM7/8/20
to Chromium-discuss, ykono...@gmail.com
Thanks a lot, this works.
As I understand it's impossible to set predefined flag value, so exact value configuration is madness.
However default value is better then nothing.

среда, 8 июля 2020 г., 0:18:00 UTC+4 пользователь Lily Chen написал:
Reply all
Reply to author
Forward
0 new messages