[Kde-games-devel] First wishes for KGamePopupItem
Matthew Woehlke
mw_triad at users.sourceforge.net
Tue Jul 3 06:18:50 CEST 2007
Ian Wadham wrote:
> On Fri, 29 Jun 2007 01:10 pm, Matthew Woehlke wrote:
>> Ian Wadham wrote:
>>> "A set of methods used to work with colors." :-)
>> Better now? ;-)
>>
> Yes, indeed. An excellent overview.
Thanks! :-)
> It also indicates where
> and how it differs from QPalette, which I was finding confusing
> when reading the methods doco. BTW, as a by-product, can
> you use some methods to compute a contrast color or a blend-in
> color for a given color (e.g. a background for a piece-color the
> player has chosen in a color dialog)? It looks that way.
Yes indeed! There are a couple possibilities; in KCS there is
shade(QColor, ShadeRole) if you want a similar color with a different
luma (probably what you're thinking of for 'contrast colors',
particularly since all shade roles are safe on blacks and whites). The
more low-level goodies are in KColorUtils, particularly mix() (which is
long overdue), overlayColors()* (if you need to use Qt's blending
modes), tint() (for changing hue and chroma without changing luma so
much - warning, unlike the other methods the algorithm is not fixed),
and then shade(), darken() and lighten().
(*...but I may yet bring this up for review, since there is a potential
that Pigment would supplant it.)
Should any of these be mentioned more prominently?
Also if you want to do something that is currently not supported, please
tell me about it. It's really late to be making changes in 4.0 but if
you can make a case for kdelibs inclusion you have a very good shot at
the next release.
> I am sorry if I was abrupt with you before, Matthew. I did not
> realise you are the author of KColorScheme and a core developer.
Hehe, I pretend to be a core developer ;-). Seriously, I was not
offended at all, you raised a very good point that truly needed to be
addressed, and I thank you for that.
--
Mathew
(sorry, .sig file is on the other computer)
More information about the kde-games-devel
mailing list