Created attachment 151309 [details] Poor contrast on the highlighed items. SUMMARY The current implementation of the wallpaper-generated accent color does not account for dark color schemes. Depending on the wallpaper, the automatically-chosen accent color may appear to dark to see. It would blend-into the background of the color theme, so highlighted/selected buttons/sliders are not legible in Plasma. The 'hyperlink text' that one would find in Spectacle, when you save a screenshot, would also be completely illegible. STEPS TO REPRODUCE 1. Select the default, unmodified Breeze Dark color theme or Global Theme. 2. Select the 'From Wallpaper' option in the Colors KCM. 3. Cycle to a dark wallpaper. 4. Open the Application Launcher (Kick-off) OBSERVED RESULT With the wallpaper's accent color applied on Breeze Dark, highlighted/selected buttons/sliders are not legible in Plasma, and "Hyperlink Text" is either too dark or invisible due to poor contrast. EXPECTED RESULT The accent colors are bright enough to stand-out, when using Breeze Dark or another similarly dark color-scheme. SOFTWARE/OS VERSIONS Operating System: openSUSE Leap 15.4 KDE Plasma Version: 5.25.4 KDE Frameworks Version: 5.96.0 Qt Version: 5.15.5 Kernel Version: 5.14.21-150400.24.18-default (64-bit) Graphics Platform: X11 Processors: 4 × Intel® Core™ i5-3320M CPU @ 2.60GHz Memory: 7.6 GiB of RAM Graphics Processor: Mesa DRI Intel® HD Graphics 4000 Manufacturer: LENOVO Product Name: 2347G2U System Version: ThinkPad T430 ADDITIONAL INFORMATION I would submit a screenshot of the bug in action, as well as some of the offending wallpapers that trigger this behavior. Unfortunately, I couldn't get a screenshot of Spectacle, it hides before the shot. I have seen these two bug reports, but I don't believe they are the same to the current one. https://bugs.kde.org/show_bug.cgi?id=442820 https://bugs.kde.org/show_bug.cgi?id=445040
Created attachment 151310 [details] Sample wallpaper for bad contrast.
Created attachment 151311 [details] Another sample.
Created attachment 151312 [details] The worst one.
Heh yeah this happens as well with light-colored wallpapers when using a light color scheme. Probably when you're using a dark color scheme, we should apply a small amount of lightening to wallpaper-derived accent colors that are calculated to be too dark, and darken light ones when using a light color scheme.
This doesn't seem to be fixable by judging the system color scheme, as one can choose Breeze Twilight, and Plasma components will still use the dark color scheme but the color scheme is still light.
Hmm, that's true. Perhaps we could just unconditionally lighten very dark calculated colors and darken very light calculated colors. That's probably the best we can do, and beyond that, users will just need to live with poor contrast when they choose to use this combination of features.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1095
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1104
First of all I absolutely love the wallpaper based accent colour, brilliant work/idea. Unfortunately I also like dark wallpapers and the dark theme, so 50% of my backgrounds lead to very poor contrast for the highlight colour. Would it be possible to modify the process to keep the selected hue H/saturation S of the accent colour but always increase/decrease the value V of the HSV tuple of the accent colour to be always lets say 25% higher/lower than the panel from the dark/light themes respectively. That way there should always be enough contrast. Ciao Karsten
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2046
Git commit 95766459f3c7de96c79f4fc1bb220b7e77f1140d by Nate Graham. Committed on 25/08/2022 at 18:21. Pushed by ngraham into branch 'master'. Adjust wallpaper accent calculation to increase contrast and vibrancy Right now, the calculation prefers the image's dominant color, which is likely to be a color from the background. As a result, it often returns a color that is very dark or muted, especially with wallpapers based on night landscaped or space. The darkness is especially problematic when using a dark color scheme, where it causes contrast issues. It also has the effect of making the selection highlight on the desktop hard to see since by definition, its color will be very similar to the most common color in the wallpaper. This commit adjusts the wallpaper accent color calculation as follows: 1. Consider a narrower range of lightness values acceptable; now the lightness has to be at least 0.4, and it can't be darker than 0.75. This fixes most of the contrast issues. 2. Try the wallpaper's highlight color before the dominant color. This tends to pick the color in the wallpaper that is most likely to draw the user's attention, even if it's not the most common color. It also tends to be a richer and brighter color compared to the dominant color, so the extracted accent color is more likly to be bright and pretty rather than dark and muted. 3. If the highlight color or dominant color isn't within the specified lightness range, lighten or darken it and try again. This makes the algorithm work harder to try to give you a color based on the highlight color or the dominant color and avoid falling back to the average color, which is highly likely to return a drab, muted color. FIXED-IN: 5.26 M +23 -11 desktoppackage/contents/views/Desktop.qml https://invent.kde.org/plasma/plasma-desktop/commit/95766459f3c7de96c79f4fc1bb220b7e77f1140d
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/731
Git commit 6da378a1d764fb73bbcea7339b7ed01394642463 by Fushan Wen. Committed on 12/09/2022 at 16:39. Pushed by fusionfuture into branch 'master'. imagecolors: make extracted colors follow WCAG contrast criterion Filter the pixels by chroma, and adjust the lightness of extracted colors to follow WCAG Non-text Contrast (dark theme) orContrast (Minimum) (light theme). M +65 -3 src/imagecolors.cpp M +5 -2 src/imagecolors.h https://invent.kde.org/frameworks/kirigami/commit/6da378a1d764fb73bbcea7339b7ed01394642463