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)

On Tue, Feb 5, 2013 at 12:54 PM, Rik Cabanier <cabanier@gmail.com> wrote:

>
>
> On Tue, Feb 5, 2013 at 11:27 PM, Alan Gresley <alan@css-class.com> wrote:
>
>> On 5/02/2013 3:52 PM, Brad Kemper wrote:
>>
>>  Wrong and correction. A pre-multiplied gradient of yellow to
>>>> transparent to blue compiste of a whitye background is identical to
>>>> a gradient of yellow to white to blue (fully opaque).
>>>>
>>>> What do you want to achieve with a gradient that has alpha
>>>> transparency and have you tested any of this by observing the
>>>> difference between pre-multiplied colorspace and non pre-multiplied
>>>> colorspace?
>>>>
>>>
>>> As I recall, last time I had a problem with the way Safari does
>>> gradients, it was a solid color to transparent, and the stuff
>>> underneath it was variable, some white, some other colors. I just
>>> wanted the color to fade to transparent over the varied background,
>>> but instead it looked dirtier as it faded out.
>>>
>>
>> Was this for a gradient with two color stops or three color stops? For a
>> gradient with two color stops, you can avoid the dirtier composite color
>> (really just less lighter ~ HSL) by going to it transparent counterpart.
>> Like red to transparent-red or yellow to transparent-yellow. For a gradient
>> with two color stops (transparent at one end), a non pre-multiplied
>> gradient going back to it transparent-color is the same as a pre-multiplied
>> gradient going to transparent (the keyword does not have a special meaning).
>>
>> BTW, the way Safari does gradients is the way that Firefox does gradients
>> prefixed and now un-prefixed (since FF16). The gradients are done in non
>> pre-multiplied colorspace.
>
>
> The spec says they should be premultiplied so Opera and IE have
> implemented it that way.
> I'm unsure what we can do next. I have not seen anyone offer to update the
> spec text...
>

I would like to follow up on this.
The spec currently states that colors need to be premultiplied but only IE
implements it that way.

Can we fix the spec to not make gradients premultiplied and instead special
case the 'transparent' keyword?

Received on Tuesday, 26 February 2013 22:06:19 UTC