Re: [filter-effects] hue-rotate() and saturate() filters

On Mon, Oct 14, 2013 at 1:23 PM, Chris Lilley <chris@w3.org> wrote:

> Hello Rik,
>
> Monday, October 14, 2013, 8:42:46 PM, you wrote:
>
> > On Sat, Oct 12, 2013 at 8:53 PM, Michael Mullany <michael@sencha.com>
> wrote:
> > Has there been any thought of converting content to HSL before
> > applying these filter shorthands? Or adding true HSL primitives to
> > the filter toolbox? (Something like an feFuncH or feFuncS).
>
>
> > As Chris mentions, being able to switch the working colorspace to
> > Lab
>
> CIE Lab is a non-linear light, approximately perceptually linear,
> rectilinear colour space. Linear matrix operations in that space would
> not naturally be hue preserving or saturation/chroma preserving.
>
> As Michael pointed out, a polar coordinate space is a more natural fit
> there.
>
> > (not sure what CIELCHab is though)
>
> Rik, for someone who has implemented a color management engine in a
> commercial product you continually surprise me with what you do and
> don't know.
>

Really? Can you show me a commercial software product that uses this
colorspace?
A Google search reveals 31 webpages of mostly SVG mailing threads.
Maybe this is well known in academics?



> In 1976 the CIE produced two colourspaces - CIE L*a*b* and CIE L*u*v*.
> In normal conversation the asterisks are dropped and they are called
> Lab and Luv respectively.
>
> Polar forms of each were also produced, retaining the L axis and
> transforming a,b (or u,v) into a Hue angle H and a Chroma (similar to
> saturation) C. Because the two forms both have the same names for the
> three axes (L, C, H) they are disambiguated by a subscript ab or uv as
> appropriate - LCHab or LCHuv.
>

OK. Why should we push that complexity to the user?
CIELCHab doesn't sound like a different colorspace from Lab; it's more like
a simple transform (like hsl()/rgb() in CSS)


> Incidentally these polar forms were what inspired Tektronix et al to
> come up with HSL, HSV and similar polar forms of RGB. Unlike the
> measurement-based CIE forms, however, HSL and HSV are not perceptually
> uniform and have some odd behaviour - primary blue (#00F) and secondary
> yellow (#FF0) have the same lightness in HSL and the same value in
> HSV.


> > However, doing so would require a whole new set of formulas in the
> > filters specification and a lot of work in the browsers...
>
> Not really. In each case, you transform to the working colourspace,
> perform channelwise operations, then transform back.


The same channelwise operations? So the sepia, grayscale or saturate
formulas wouldn't change?
No, the formulas would have to be different.

Received on Monday, 14 October 2013 21:21:26 UTC