changing KGraphicsUtils?

Andreas Pakulat apaku at gmx.de
Fri Jun 1 11:02:04 BST 2007


On 31.05.07 21:46:36, Michael Pyne wrote:
> On Thursday 31 May 2007, Thomas Zander wrote:
> We have had a lot of people pipe up saying that colorspace foo is awesome, 
> etc. etc. but I think we should focus on the problem of blending colors.  So 
> who needs a blending function, and what did they need from it?  What I gather 
> so far is:
> 
> * Usability improvements (blending would be the underlying code for lighten(), 
> darken() and otherwise adjusting color schemes).
> * Use in widget styles.  But perhaps this should be in KStyle then.
> * And I've already forgotten what else.  But if you need this feature, don't 
> just let implementors hash it out (the design-by-committee), you need to 
> speak up too! :)

In applications like KDevelop or Quanta we currently have no
color-configuration dialog for things that don't fit into the existing
palette roles. For example even if the usability stuff gets integrated
into kdelibs for KDE4.1 KDevelop still needs a blending function to
create a color for warnings (only an error group is given in the
extended palette). These can be achieved quite well by mixing an
existing color (for example the error color role) with the background
color. Amount would be something > 50% (50% blend between white and red
is too light to have enough contrast). 

As we get both colors from the palette we can't be sure that none of the
two has an alpha value set. The currently implemented blendColor
function looses the alpha value of the first color completely and I
wrote some extra code to check wether the 2nd color has an alpha value
set or not and then set my own value or use the existing one to mix
them. I have currently no idea whether it is planned to have a color
scheme where certain colors use an alpha value != 1, but if so we surely
need a better blendColor function. 

Andreas

-- 
Is this really happening?




More information about the kde-core-devel mailing list