KColor is coming this Monday...

Michael Pyne michael.pyne at kdemail.net
Sat May 26 02:28:41 BST 2007


On Friday 25 May 2007, Matthew Woehlke wrote:
> Michael Pyne wrote:
> > Zack's screenshot is pretty convincing [snip]
>
> Well I would like to thank Zack for amply demonstrating the importance
> of API documentation. :-) And for making this demo so much easier to write.

Code always helps. :)

> Zack's screenshot looks "convincing" because he /asked/ KColor to tinker
> with the saturation as well as the luminance. Incidentally this is a
> KColor feature that QColor lacks. (Yes, I acknowledge that he probably
> did this because KColor isn't well documented yet.)

You're right, I removed the third parameter and then QColor and KColor become 
identical.

> And for the grand finale, a demonstration of how QColor can't keep its
> hands off the saturation when you /don't/ want to play with it is
> attached. Note that the KColor bars do /not/ result in fully saturated
> colors when starting with a gray tone, whereas the QColor bars do. You
> can also note how the white point depends on the starting color with
> QColor, which is not true for KColor.

To help me visualize I added a slider that adjust the initial saturation of 
the four colors before drawing the bands.  I'm not sure what's going on with 
the calculator for QColor when val >= 100 but assuming that's correct it 
seems you're right about the amount of lightening to reach white being 
dependant on the color.

But I guess the question for kdelibs is, do applications need a blend() or do 
applications need the full-blown capabilities of KColor?  And if we put in 
KColor, who's going to add HSL support to kcolorchooser? ;)

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo3.tar.bz2
Type: application/x-tbz
Size: 5798 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070525/154d1863/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo3.png
Type: image/png
Size: 9970 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070525/154d1863/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070525/154d1863/attachment.sig>


More information about the kde-core-devel mailing list