Re: [CSS4 color][CSS4 transition] color pre-multiplied vs non pre-multiplied

On Friday 2013-02-01 15:31 +1100, Alan Gresley wrote:
> On 1/02/2013 2:25 PM, Rik Cabanier wrote:
> >So, can we fix the spec?
> 
> Yes. Changing the part here [1] regarding example 23 and the second note
> that discusses premultiplied color space.
> 
> Giving an example of how to create a gradient from color to
> transparent-color like so:
> 
>   linear-gradient(red, rgba(255,0,0,0))
> 
>   linear-gradient(red, rgba(255,0,0,0) 50%, rgba(0,0,255,0) 50%, blue)
> 
> 
> Possibly consider a new way to trigger transparent-color:
> 
>   linear-gradient(red, pre-transparent)
> 
>   linear-gradient(red, pre-transparent, blue)
> 
> 
> >I volunteer to fix the implementation in FF and WK.
> 
> 
> What would you fix in FF and what is WK?
> 
> I would volunteer to create examples for gradients.
> 
> 
> Regarding transitioning of color. Maybe dealing with issue 7 [2]. If
> pre-transparent ever becomes a reality, then this is not an issue anymore
> and can be changed before transition is _un-prefixed_.
> 
> 
> 1. http://dev.w3.org/csswg/css3-images/#color-stop-syntax
> 2. http://dev.w3.org/csswg/css3-transitions/#animatable-types

I believe the transitions spec is currently fine since it specifies
that interpolation of colors is premultiplied:
https://drafts.csswg.org/css-transitions-1/#animatable-types

Interpolation of gradient stops is also premultiplied:
https://drafts.csswg.org/css-images/#color-stop-syntax

I believe implementations have been trending towards matching on
both counts, so I think no spec change is currently needed.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Wednesday, 12 August 2015 22:01:26 UTC