Bug 461939 - Plasma panel items don't change color like titlebars and others in keeping with the new dynamic accent color
Summary: Plasma panel items don't change color like titlebars and others in keeping wi...
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (other bugs)
Version First Reported In: 5.26.3
Platform: Debian testing Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-17 08:55 UTC by Sadi
Modified: 2022-11-26 11:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Items on translucent top panel and dolphin window with dynamic accent color (174.04 KB, image/jpeg)
2022-11-17 08:55 UTC, Sadi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sadi 2022-11-17 08:55:28 UTC
Created attachment 153824 [details]
Items on translucent top panel and dolphin window with dynamic accent color

SUMMARY
***
The new color scheme option to use accent color from current wallpaper is a great addition to the appearance.
I love it especially when used with wallpaper type slideshow .
Depending on the accent color change, titlebar texts  and other items change color smartly between black and white so that they remain visible.
However, items on the panel(s) remain indifferent to this dynamic accent color change, unfortunately, and this creates a visibility problem in the case of panel translucency.
***

STEPS TO REPRODUCE
1. Add widgets "Window Title" an "Global Menu" to the default panel, and move it to the top.
2. Create a special wallpaper folder with some light and dark colored images.
3. Choose "Use accent color: From current wallpaper" in System Settings:Appearence:Colors  and "Wallpaper type:Slideshow" in Configure Desktop and Wallpaper...:Wallpaper, and the wallpaper folder created above.

OBSERVED RESULT
When the accent color used from current wallpaper is dark, titlebar text and some other items (inc. monochrome icons)  smartly change to white, but similar items on the panel remain black, therefore hard to see in some places.     

EXPECTED RESULT
All text and monochrome icons  the panel should change between black and white like those in app windows titlebar etc. 

SOFTWARE/OS VERSIONS
Operating System: SparkyLinux 7 (based on Debian Testing)
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Comment 1 veggero 2022-11-19 18:36:13 UTC
Plasma panels follow the normal background color of windows, not the accent color. You can basically consider plasma panels as the content of a window. This means that it's only appropriate for them to use the same font color as window's content, which is black in both screenshots.
Comment 2 Sadi 2022-11-20 12:42:50 UTC
(In reply to veggero from comment #1)
> Plasma panels follow the normal background color of windows, not the accent
> color. You can basically consider plasma panels as the content of a window.
> This means that it's only appropriate for them to use the same font color as
> window's content, which is black in both screenshots.

Then wouldn't it be better to change this, and make panels handle colors in keeping with title/menu/toolbars, instead of the current behavior like main app windows???
Comment 3 Sadi 2022-11-20 12:45:55 UTC
I think at least this might be considered as a new feature to be added in the future to "More Options..."
Comment 4 veggero 2022-11-20 13:06:09 UTC
No; I don't see any particular reason why the panel should follow the titlebar colorscheme instead of the normal one, unless you're doing some very niche customization, which is covered by Latte and not normal panels.
Comment 5 Sadi 2022-11-21 12:40:42 UTC
I'm sorry for taking your time regarding this "very niche customization" as you call it.

I've actually stopped using latte-dock very recently, seeing that plasma panels have come so close to offering the same features.
It seems the only missing ones now are (1) this "adaptive color", and (2) zoom effect in "Icons-Only Task Manager".
Especially after the latest dynamic accent color feature, the first one is much more important that the fancy zoom effect.

Could you perhaps give me a tip for detecting from the command line when the new dynamic accent color from current wallpaper result in change of color in window title/menu/tool bars?
I could then use a script that changes the plasma theme colors in keeping with it...
Comment 6 Sadi 2022-11-26 11:31:15 UTC
For anyone who is interested, it seems there are two possible workarounds to get rid of this inconsistency:
1.  When using dynamic accent color from current wallpaper (plus using wallpaper slideshow), inconsistency can be prevented by choosing a custom tinted color scheme with the option "Make window titlebars accent-colored" unchecked (which stops changing titlebar foreground color between black and white).
2. A more complex workaround can be implemented by running a script in the background which detects change of titlebar foreground color between black and white in file "~/.config/kdeglobals", section "[WM]", line "activeForeground=", and changes plasma theme as well as icon theme (e.g. by creating a custom icon theme that only includes alternative panel/status icons) between dark and light whenever its value changes between "0,0,0" and "255,255,255".  However, such a script making use of inotifywait command, for example, doesn't work well, probably because it creates too much of a burden for plasmashell. Therefore, I had to give up on this, and choose the first workaround at the end.