Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Auto Dark Mode for Web Contents" not working properly #871

Closed
KickMultistream opened this issue Sep 6, 2024 · 8 comments
Closed

"Auto Dark Mode for Web Contents" not working properly #871

KickMultistream opened this issue Sep 6, 2024 · 8 comments
Labels
Minor bug A bug that does not break the browser

Comments

@KickMultistream
Copy link

KickMultistream commented Sep 6, 2024

Describe the bug
unlike in previous versions the "Auto Dark Mode for Web Contents" flag is not working properly, instead of only inverting the web elements it's messing up images too.
It doesn't matter if i use "enabled with simple X based inversion" or just "enabled" the images are still being inverted.

OS: WIndows 10
Supermium 126.0.6478.249 (Release)

here's an example from https://clw.kooora.com/
how it should look like (Auto Dark Mode for Web Contents: enabled with simple CIELAB-based inversion) on other chromium browsers:
FZjLtEdF5e

how it looks on Supermium: (Auto Dark Mode for Web Contents: enabled with simple CIELAB-based inversion)
chrome_ETSaR0D99c

same thing on other websites like https://www.hltv.org/

@KickMultistream KickMultistream added the Minor bug A bug that does not break the browser label Sep 6, 2024
@KickMultistream
Copy link
Author

this bug occurs on the chrome extension store too.

@Vangelis66
Copy link

Vangelis66 commented Sep 8, 2024

... FWIW, this bug on

https://clw.kooora.com/

is even reproducible in Supermium-v121-r2 (with chrome://flags/#enable-force-dark set to just Enabled) :

black

As a workaround, I myself leave the flag chrome://flags/#enable-force-dark at its Default setting and use the Dark Reader extension in its place 😜 ...

@Sp0kzz
Copy link

Sp0kzz commented Sep 8, 2024

@Vangelis66 on heavier sites dark mode extensions like dark reader slows down the loading time and use much more Cpu power. Nothing beats the Chromium integrated dark mode. Using Thorium 126 at the moment.

win32ss pushed a commit that referenced this issue Sep 11, 2024
…o poor algorithm for determining good candidates for colour changes.
@XakerTwo
Copy link

in addition to Sp0kzz - DarkReader has no access to secured and internal pages and elements, so light spots in dark theme will be like high beam

@win32ss am i correct that you completely remove filtering from all possible dark modes? right now colors looks more vibrant and very light images not inverted when expected. So i rather suggest add three new dark modes for space-based modes with non-images suffix. I use selective everything but right now it acts as selective non-image

@win32ss
Copy link
Owner

win32ss commented Sep 12, 2024

@win32ss am i correct that you completely remove filtering from all possible dark modes? right now colors looks more vibrant and very light images not inverted when expected. So i rather suggest add three new dark modes for space-based modes with non-images suffix. I use selective everything but right now it acts as selective non-image

Yes, the image filtering was disabled in 126 R3 (and is the only change that affects non-XP systems in this release) due to the issues with the "smart" filtering. However I will work on improving the dark modes in the future.

win32ss pushed a commit that referenced this issue Oct 18, 2024
…ow be applied to the renderer process via the dark-mode-settings switch, which also needs the corresponding WebContentsForceDark feature to be enabled. This required the introduction of a hack in feature_list to enable the feature when the switch is present, avoiding the need for the user to use two separate flags to enable and use the feature. Furthermore, several options were duplicates with different labels. Now each option is unique, with the ability to have CIELAB/HSL/RGB-based forced darkening, both with and without selective image modification, as opposed to having duplicates of the CIELAB options.
@Nvdtn19
Copy link

Nvdtn19 commented Oct 20, 2024

@win32ss am i correct that you completely remove filtering from all possible dark modes? right now colors looks more vibrant and very light images not inverted when expected. So i rather suggest add three new dark modes for space-based modes with non-images suffix. I use selective everything but right now it acts as selective non-image

Yes, the image filtering was disabled in 126 R3 (and is the only change that affects non-XP systems in this release) due to the issues with the "smart" filtering. However I will work on improving the dark modes in the future.

@win32ss I just updated Supermium and now it's missing the "Enabled with selective inversion of non-image elements". And that's the option that I frequently use. So why it's getting removed unexpectedly? If not then what's the alternative option that I can use?

@XakerTwo
Copy link

XakerTwo commented Oct 20, 2024

@Nvdtn19
short
with simple CIELAB-based inversion

long/hard

see about_flags.cc in 837ff97
red is removed, green is added

see the red lines:
at top of the red-part - the number of modes in form of pair mode_key - mode_config
at bottom of the red-part - the list of translation - mode_key pairs

see the green lines and search for one, similar to one you need. they are in more simple form - list of translation - mode_config pairs, but less readable due to numeric values

in your case you wish one, similar to with selective inversion of non-image elements
the former mode_key is kForceDark_SelectiveElementInversion
the config of this mode is

{
    {"inversion_method", "cielab_based"},
    {"image_behavior", "none"},
    {"foreground_lightness_threshold", "150"},
    {"background_lightness_threshold", "205"}
}

note - mode with key kForceDark_SimpleCielab has the same config

anyway general mode is CIELAB, but simple or selective - relying on former duplicated mode_key, it should be simple

so try with simple CIELAB-based inversion

@win32ss
Copy link
Owner

win32ss commented Oct 20, 2024

Yes, "Enabled with selected inversion of non-image elements" was a duplicate of "with simple CIELAB-based inversion". Now there are options for CIELAB, HSL and RGB inversion of non-image elements, but also CIELAB, HSL and RGB inversion of non-image elements plus selected images. Before only CIELAB inversion of image elements was available.

@win32ss win32ss closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor bug A bug that does not break the browser
Projects
Development

No branches or pull requests

6 participants