W3C home > Mailing lists > Public > www-style@w3.org > May 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 17 May 2012 18:13:17 -0700
Message-ID: <CAAWBYDCrNGz=29ZoAYdN7JQgmGiRQc-9iofiavZy1dmPofdDEA@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: "www-style@w3.org" <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:54 GMT