Bug 383515

Summary: Invert effect: invert luminosity instead of color
Product: [Plasma] kwin Reporter: Carli Samuele <wohthan>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Carli Samuele 2017-08-14 20:28:57 UTC
I'm an avid user of the invert effect. 
It's really invaluable when you have to switch between bright and dark environments very often!

It would be great though if it would be possible to invert brightness instead of color: the overall effect would be similar, but most of the UIs would stay intelligible (white would become black, but light blue would become dark blue instead of orange and so on: everything that relies on color would pretty much keep it's meaning. Pictures would still look bad but probably still easier to figure out compared to the inverted ones). 

As far as I uderstand, this effect could be implemented in a very similar way to the current one: instead of doing the RGB complement, it should convert to HSL, invert the luminosity and convert back to RGB. 

From a quick glance to http://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl ,  the convertion shouldn't be too difficult to carry on. 

This could have it's independent life as an additional effect, or could be a configuration option in the current invert effect (I personally believe the latter option actualy makes more sense though.)


I think I could be able to work out the math and come up with a c++ code snippet myself, but I got quite confused by the whole KDE development process with which I have no experience. If someone knows how to properly compile and test kwin, thinks that implementing this would be a good idea and is willing to share some of his experience, it would be great to work on it together!
Comment 1 Martin Flöser 2017-08-15 04:25:41 UTC
I don't expect any of the core developers to work on this, we have too many tasks already. Due to that I set to won't fix as I don't want to give false expectations.