blend function urgently needed in kdelibs

Matthew Woehlke mw_triad at
Mon May 21 21:11:39 BST 2007

Andreas Pakulat wrote:
> On 21.05.07 14:31:45, Matthew Woehlke wrote:
>> kdelibs desperately needs a color blending function. I am volunteering (yet 
>> again) to provide one that looks like this:
>> KColor blend(const KColor& c1, const KColor& c2,
>>              double k = 0.5, double r = 0.5, SPEC cs = CS_RGB,
>>              int flags = BLEND_NORMAL, int cmask = 0x0000FFFF);
>> Can someone PLEASE suggest where I can put such a thing? (Due to lack of prior 
>> response, if I don't hear back by next Monday I'm going to /pick/ somewhere and 
>> people can bitch about it.)

Well, at least I got a reply this time :-). (Thanks all!)

> I also think kdefx would be more apropriate than kdeui/colors, the
> latter one is mainly for color-related widgets, while the former has
> kstyle and co, and I guess KStyle would need such a thing (or am I wrong
> there?)

No, kdeui/colors is definitely wrong, but kdefx seems a little heavy for 
how basic I think of blend() being, which is why I'm eying kdeui/kernel. 
What do others think?

(Clearly I did see the other posts, but not before I had posted my own 
reply to myself :-).)

In fact KStyle itself I'm not sure needs it, but KStyles probably do 
(Ion - if/when I ever finish it - does, and actually needs also 
HSV-based darken() and lighten() which is one reason for the complicated 

> And I would've talked to you about blend() anyway before putting
> anything in KDevelop ;)

Thanks for that, Andreas :-).

When in doubt, duct tape!

More information about the kde-core-devel mailing list