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

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

From: Rik Cabanier <cabanier@gmail.com>
Date: Mon, 21 May 2012 15:15:19 +0300
Message-ID: <CAGN7qDABWOku0SeHi-dmGficauQepejrnPu2yoVMQuPyTyduhQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Cameron McCormack <cam@mcc.id.au>, "www-style@w3.org" <www-style@w3.org>
On Mon, May 21, 2012 at 10:16 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> 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.
>

How do we find out if this is useful for authors?
I agree that they can look at the HSL color wheel and see how the colors
would transition.


>
> > 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.


I don't think it would be that hard. For almost all content, the color
would immediately translate from Lab to sRGB (with the exception of
gradients).
If we later on define a way to change the default colorspace from sRGB, the
Lab values would translate to that.

Rik
Received on Monday, 21 May 2012 12:16:11 GMT

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