Re: [css3-transitions] colour space used for colour interpolations

On Thu, May 17, 2012 at 6:05 PM, Cameron McCormack <cam@mcc.id.au> wrote:
> Tab Atkins Jr.:
>> I'm in favor of making this apply.  Note that transitions and
>> gradients both work in *premultiplied* sRGB right now.  SVG officially
>> doesn't have transparent colors, but in practice it does in browsers,
>> as they accept all the valid CSS colors.
>
> Yeah, we'll need to update SVG 2 to handle the new color values that
> css3-color defines.
>
> I remember some previous discussion about whether an animation between two
> hsl() colours should interpolate in the HSL colour space by default.  (Can't
> remember whether this was in an SVG or CSS context.)  My guess is that that
> is probably what you want, but not necessarily always.  We could introduce
> an "auto" value for color-interpolation that, for animations, looks looks at
> the two colour values being interpolated between and to choose the
> appropriate colour space.  If the two colours are different types (say rgb()
> and hsl()) then we choose sRGB, but if they're both hsl() then we choose
> HSL.

We definitely can't do it by default, since current transitions and
gradients don't care how you specify the colors.  But an 'auto'
keyword would be appropriate.

~TJ

Received on Friday, 18 May 2012 01:14:07 UTC