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

On Sun, May 20, 2012 at 11:26 AM, Rik Cabanier <cabanier@gmail.com> wrote:
> On Fri, May 18, 2012 at 3:43 AM, Cameron McCormack <cam@mcc.id.au> wrote:
>> In SVG, the color-interpolation property is used to control the colour
>> space in which SVG animations on properties like fill, stroke and stop-color
>> are performed.  Should this apply to CSS Transitions and Animations on
>> properties that take colours too?  It'd be good to have the same
>> interpolations available in both kinds of animation.
>>
>> (Brian mentioned to me that people also want to be able to interpolate in
>> other colour spaces, like HSL or L*a*b too -- we could extend
>> color-interpolation with options for that.)
>
> I'm not sure if it makes sense to have interpolation in HSL. It seems that
> it introduces more complexities than needed. Authors probably feel that it
> should interpolate like RGB since it's just a different representation and
> not really a new colorspace.

No, in my experience authors definitely want something that, for
example, transitions from green to blue without passing through gray
in the middle.  We think in terms of the color wheel, not the RGB
cube.  Whether that "something" is a transition in HSL space, or a
transition in some other space with similar-but-better results
(CIELCH?), probably doesn't matter that much.

> Lab would be nice to have since it will interpolate in a visually pleasing
> way. The conversion from Lab to RGB will also work around the problem where
> the sRGB response curve makes intermediate values looks too dark/muddy.
>
> If we can make Lab a first class citizen, there is no more need to
> color-interpolation so it's better to not go through the trouble of speccing
> and implementing it.
> At some point, we should look into better color management in the browser.
> color-interpolation and color-interpolation-filters are rooted in the world
> of monitors. Modern devices can display more colors than sRGB so we should
> find a way to expose that.

I'd enjoy getting Lab into the browser, though I don't understand what
difficulties may lie in the way.

~TJ

Received on Monday, 21 May 2012 07:17:41 UTC