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

Hello Michael,

Monday, October 14, 2013, 11:35:34 PM, you wrote:

> How much more math would that introduce?

Very little. As you note, just converting to a polar colourspace and
doing the computations there is an appropriate way to manipulate hue
and chroma/saturation.

> If it is a lot, can it be
> implemented in hardware on limited devices?

Multiplies and adds are not a lot. Especially for CSS where the one
calculation gives the result; its not like raster images where the
same calculation is done for each pixel (so thousands or millions of
times).

>> Are you aware of any user complaints (apart from yourself :-))


> Only 2 so far, but I can blog about this and see how many people think it's a big deal.

> http://stackoverflow.com/questions/19187905/why-doesnt-hue-rotation-by-180deg-and-180deg-yield-the-original-color

As that thread notes, using unsaturated pastel colours gives the
expected result; and not clamping to a 0..1 (0..255) range also gives
the expected result. Filters uses early clamping, each stage clamps.
As a result, four hue angle rotates of 90 degrees on yellow gives you,
well, dark brown. This is not exactly a subtle difference, and
might be expected to trigger 'user complaints'.

> https://code.google.com/p/chromium/issues/detail?id=237524






-- 
Best regards,
 Chris                            mailto:chris@w3.org

Received on Monday, 14 October 2013 22:38:11 UTC