W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [CSS4 color][CSS4 transition] color pre-multiplied vs non pre-multiplied was (Re: [CSSWG] Minutes TPAC Tue 2012-10-30 AM I: Abstract Directions, Transforms, Transitions)

From: Alan Gresley <alan@css-class.com>
Date: Sun, 03 Feb 2013 04:01:48 +1100
Message-ID: <510D467C.9070004@css-class.com>
To: Brad Kemper <brad.kemper@gmail.com>
CC: Simon Fraser <smfr@me.com>, Rik Cabanier <cabanier@gmail.com>, fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
On 2/02/2013 1:50 AM, Brad Kemper wrote:
> On Jan 31, 2013, at 11:18 PM, Simon Fraser <smfr@me.com> wrote:
>> We rely on Core Graphics to render gradients on Mac, and that can't
>> do pre-multiplied. That's the main reason why gradients don't match
>> transitions.
> If I understand correctly, this means that if an author wants a nice
> clean-looking 3-stop gradient that goes from yellow to transparent to
> blue, he will have to use two same-position transparent color stops,
> so that it is actually yellow to transparent-yellow, and then
> transparent-blue to blue. Couldn't WebKit just perform this extra
> conversion step for us before passing it on to Core Graphics?

It still won't work. A pre-multiplied gradient of yellow to transparent 
to blue is not the same as a non pre-multiplied gradient of yellow to 
transparent-yellow, and then transparent-blue to blue.

That is why I have suggested pre-transparent (or pm-transparent) as a 
way to do this when support for pre-multiplied gradients is universal.

Alan Gresley
Received on Saturday, 2 February 2013 17:02:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC