W3C home > Mailing lists > Public > public-fx@w3.org > October to December 2013

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

From: Dirk Schulze <dschulze@adobe.com>
Date: Tue, 15 Oct 2013 02:37:37 -0700
To: Chris Lilley <chris@w3.org>
CC: Michael Mullany <michael@sencha.com>, "public-fx@w3.org" <public-fx@w3.org>
Message-ID: <A7A1147E-02CB-4577-BFD2-1466E0485CA0@adobe.com>

On Oct 14, 2013, at 11:28 AM, Chris Lilley <chris@w3.org> wrote:

> Hello Michael,
> 
> Sunday, October 13, 2013, 5:53:20 AM, you wrote:
> 
> Thanks for carefully demonstrating the problem with examples.
> 
>> I do understand that because these filters are a linear matrix
>> approximation and remain in RGB space, there will be inaccuracies
>> when trying to do HSL ops,
> 
> Your analysis is correct as to the reason
> 
>> but these seem very extreme to me, and
>> very unexpected. But they seem to be consistent between Firefox and
>> Webkit/Blink - (when converted to SVG equivalents) - so I do not think this is a bug.
> 
> Yes, this is not a bug (the implementations are following the
> specification), from SVG1
> 
>> 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). 
> 
> Also correct that changing the colourspace used for computations to
> one using polar coordinates would give more intuitive results.

Shouldn't the conversion between RGB and HSL be bijective? So if both color spaces are bijective, the algorithm described by feColorMatrix must be wrong[1]. Polar coordinates or not, every color in HSL should be describable in RGB. And we still do the animation on the hue value and not on the RGB values. It also depends of course if the definition of hue in Filter Effects is equivalent to the definition of hue in HSL. Same (and probably more dramatic) for saturate. SVG 1.1 is not very clear about that.

Greetings,
Dirk

[1] https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#feColorMatrixElement

> 
> SVG has a color-interpolation property which is used for
> non-filter operations; in SVG2 this is updated to add two polar spaces
> (HSL and CIELCHab). The same addition could be made to
> color-interpolation-filters.
> 
> -- 
> Best regards,
> Chris                            mailto:chris@w3.org
> 
> 
Received on Tuesday, 15 October 2013 09:38:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:47 UTC