From kde-devel Thu Jun 26 22:49:23 2008 From: Matthew Woehlke Date: Thu, 26 Jun 2008 22:49:23 +0000 To: kde-devel Subject: Re: Color Palette Nits Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=121452065111527 Percy Camilo Triveņo Aucahuasi wrote: > Matthew Woehlke wrote: >> Aside from David's comment (which is right), what is "luminance"? :-) >> KColorUtils::luma returns the 'apparent brightness' of a color (white is >> 1.0, black is 0.0, anything else is somewhere in-between). More >> technically, it returns the Y' component of the color's H'C'Y' >> colorspace representation. > > As far I know, luminance is apply in colors to obtain a value without gamma > correction, instead luma that apply gamma correction to every -RGB- > component of the color. What I meant was, despite there being a technically correct definition, the term is sufficiently abused as to be somewhat confusing. Hence the :-). >> At the very least, the above is redundant with qGray - KCU::luma uses gamma > correction as well, which matches with how KCS handles >light/dark stuff. > > In short: > Luma: > Y' = 0.2126 R' + 0.7152 G' + 0.0722 B' > Luminance: > Y = 0.2126 R + 0.7152 G + 0.0722 B > > KColorUtils only have a luma fuction ... luminance maybe could be this: > KHCY::lumag in KColorSpaces. I think non-gamma-corrected is close enough to qGray that we don't really need it. Besides, the point of using H'C'Y' in the first place was that it was the color space being called for from the Usability side, i.e. we would prefer for people to use it instead of whatever else :-). (As you may recall, there was some rather violent disagreement with that at the time...) (lumag is intentionally private, it's used as a helper in conversion, but it's not meant to be used outside of KHCY. And KColorSpaces itself is private outside of kdeui; currently it's only used as the back-end for KColorUtils, although at some point I want the standard color picker to use HCY as well.) -- Matthew This message includes NO WARRANTY, not even the implied warranties of READABILITY or RELEVANCE TO A PARTICULAR TOPIC. Read at your own risk. ;-) >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<