Color problems [was: Re: KDElibs: KSystemTray: On window close dialog]

David Johnson david at
Wed Sep 29 05:48:57 BST 2004

On Tuesday 28 September 2004 02:23 am, Olaf Jan Schmidt wrote:

> None of the styles works correctrly using a white on black color
> scheme. We either need to add a style frame color to the color
> scheme, or the styles need to check for the background color and
> optionally use white instead. At least the default style for KDE 3.4
> should be fixed, but it would be better if none of the styles had
> this bug.

I have to step up to the defense of style writers everywhere. The 
problem isn't that the styles are erroneous, but rather that they were 
designed for lighter colored schemes. This isn't as trite as it sounds. 
It's because 3D effects work best with lighter midtones. This is true 
regardless of any errors Qt might have in computing 3D colors.

The 3D effects don't work for darker color schemes because shadows are 
always darker, and highlights always lighter, than the surface they are 
on. To change this would be to create an unpleasant embossing effect 
for most 3d styles.

There are several styles that work with dark schemes (like "Dark Blue"), 
but to expect them to work in the presence of the "black singularity" 
is asking too much.

The solution is not to blame the styles, but rather to create a new 
style for use in situations that need high contrast dark color schemes.

> The currently algorithm for both shadow color and light effect color
> is something like:
> brightness = factor * brightness of background color
> This can be fixed by using an inverted algorithm for the light effect
> color:
> darkness = factor * darkness of background color

Not quite accurate, but I get your point. I banged my head against this 
one in the past as well.

David Johnson

More information about the kde-core-devel mailing list