Bug 484952

Summary: Kirigami Theme background colors can get lighter if system background color is lowered, leading to low-contrast text
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Sin Jeong-hun <typingcat>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: CONFIRMED ---    
Severity: normal CC: cwo.kde, nate, notmart
Priority: NOR    
Version: Master   
Target Milestone: Not decided   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot

Description Sin Jeong-hun 2024-04-03 01:40:48 UTC
Created attachment 168076 [details]
screenshot

SUMMARY
When the "Window Background" colour is lower than 25 (each of RGB), list item's background gets brighter, making it almost impossible to read the text.

STEPS TO REPRODUCE
1. Go to System Settings -> Colours. Create a copy of "Breeze Dark". Click the edit button and change the Window Background value to 24 (#191919)
2. Open Discover -> Settings.
3. 

OBSERVED RESULT
For values higher than 25, the background colour is darker than the text. But for values lower than 25, the background colour gets brighter.

EXPECTED RESULT
The background of list get darker, not brighter.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch
(available in About System)
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3

ADDITIONAL INFORMATION
Comment 1 cwo 2024-09-23 16:54:58 UTC
Can reproduce on Plasma master.

This specifically seems to apply to things using Kirigami.Theme.backgroundColor, through SwipeListItem (e.g. Discover sources page or kdeconnect app plugin list) or directly (Kirigami Gallery ListView). Also the Elisa header bar; not quite sure which color is used there. I haven't been able to reproduce it in QtWidgets applications or elsewhere in Kirigami applications I tested.