[Webkit-unassigned] [Bug 13842] Simplify Color::light() and Color::dark()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 23 09:09:23 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=13842


mitz at webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #14684|review-                     |review?
               Flag|                            |




------- Comment #4 from mitz at webkit.org  2007-05-23 09:09 PDT -------
(From update of attachment 14684)
(In reply to comment #3)
> (From update of attachment 14684 [edit])
> Does this really give the same values as before? If so, seems fine. But I was
> under the impression that scaling value didn't affect the 3 channels equally.

If you look at convertHSVToRGB() you'll see that its result can be expressed as
"v times some vector x whose components do not depend on v", so indeed for
given h and s components, scaling v affects the 3 channels equally. (IIRC in
the HSL space, L doesn't affect all channels equally, since L=1.0 maps to
white).

> I don't think dark() properly handles the case where all three of r, g, and b
> are zero.

I verified that in that case (v - 0.33f) / v is -inf and therefore the
multiplier is 0, so the result is <0,0,0,alpha>, which is what I would expect.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list