What to do about KColor?

Germain Garand germain at ebooksfrance.org
Wed May 30 01:21:32 BST 2007


Le Mercredi 30 Mai 2007 01:40, Matthew Woehlke a écrit :
> Germain Garand wrote:
> > (as for my clame to expertise, it is restricted to coming up with
> > khtml::hasSufficientContrast's algorithm using hsv, which was a pain and
> > would very likely work better in HSL)
>
> /me gags
> This is supposed to be in kdelibs, and if the usability stuff happens,
> it will be. Please pipe up when/if I start asking for comments (i.e.
> "who needs what?") on that :-).

allright, I'll try to if I'm around :)

> (And yes, functions like this really, 
> really, really should use... well, HSY. Although in this case qGray*
> should suffice, but the usability stuff needs to generate colors; that's
> trivial in HSL/HSY and a PITA to do in HSV.)
>(* qGray is a little odd because the coefficients it uses do not reflect
> either of the REC standards I am familiar with, namely 601 and 709, but
> since the Y coefficients are a function of the display device anyway, I
> don't presume that this means anything other than Qt had some reason I
> am not familiar with for choosing the coefficients that they did.)

I'm not sure about qGray's effectiveness... hasSufficientContrast function 
name is not really doing full justice to the end perceptual effect. I based 
this work on reading 
  http://www.lighthouse.org/accessibility/effective-color-contrast/
which among other details makes a point that lightness values of colors in the 
bottom half of the hue circle are not as effective, hence the distinction 
that is made between high key and low key colours.

I had a more generally usable version at some point, that considered bg/fg 
role and contrast settings... might still be able to find/finish it.

Kindly,
Germain




More information about the kde-core-devel mailing list