Color roles, coming this Monday to kdelibs?

Matthew Woehlke mw_triad at users.sourceforge.net
Sat Jun 16 00:04:25 BST 2007


Olaf Schmidt wrote:
> [ Matthew Woehlke, Fr., 15. Jun. 2007 ]
>>> and many widget styles currently
>>> reuse "selection" as a hover background colour.
>> Right, hence decoration(HoverColor) :-)
> 
> Hm, if decoration(HoverColor) is used for frames, then it is unsuitable as a 
> background. But if we have a "tint" function for this, so it is OK.

Right.

>> It's slightly complicated, I'm thinking the 'best' way is to /mostly/
>> preserve the luma of 'color' (in case 'color' and 'tint' differ mainly
>> by luma), but from there it's not as simple. Depending on the chroma* of
>> 'tint' you may want to leave the hue alone or take only some of the hue
>> of 'tint', and you probably want more of a linear blend of the chroma
>> based on 'amount'.
> 
> For many partially sighted users, it is important that you mostly preserve the 
> luma of the 'color' (e.g. a low contrast colour scheme needs to stay low 
> contrast, and a high contrast light-on-dark colour scheme needs to stay high 
> contrast light-on-dark).

Right, that's exactly what should happen in most cases. The only case 
where the luma should change is a: if the tint has the same hue and 
chroma (and then only 'just enough' to tell it is a different color), or 
if the 'amout' is really high. The thought is that amount = 1.0 gives 
the tint color, i.e. you would never actually do that except for strange 
purposes. Also (and I forgot to mention this) there will be a nice, sane 
default for 'amount', something like 0.1 probably.

I think we're saying the same thing, just in different ways :-).

> But applications should show all information in text- or icon form anyway.
> Colour may only be used as an additional visual clue; so I suggest you ensure 
> that the luma contrast and the hue are kept and focus on nice results 
> for "normal" users otherwise.

Right. As a "normal" user I would expect tinting to mostly affect hue 
and chroma (assuming I use a sane color scheme where background and 
foreground have strong luma differences, rather than differing only by 
hue :-)) so I think this will be fine.

>> (*recalling that "chroma" == "saturation" unless you're really being picky)
> 
> I didn't know about the interesting concept of "chroma" before you forwarded 
> me the link, so no, I am not picky.

Ok :-). Anyway I don't expect it to show up anywhere user-visible 
(developer-visible, yes, just because it is shorter :-), but not 
user-visible). I just wanted to make sure I wasn't being confusing.

-- 
Matthew
"I can hear you / just barely hear you / I can just barely hear you"
   -- "I Can Hear You", by They Might Be Giants





More information about the kde-core-devel mailing list