Re: [fxtf-drafts] [filter-effects-2] Add recolor() shorthand (#334)

Some thoughts:

In general, I'm very supportive of adding color effects beyond `sepia()` in the shorthand function. The sepia-saturate-hue-rotate sequence is painful & imprecise, but I've seen it recommended in multiple tutorials  and demos. So let's make it easier to do better.

Thinking of the use cases, I'd recommend a single `recolor()` or `colorize()` function that accepts 1 to 3 color values:

- 1 color value sets the target value for black pixels in the input. (White pixels stay white, and all other colors get scaled up by the change in the black point.) This addresses the common case of applying a “fill” color to a solid black icon.

- 2 color values set the target black and white points (duotone effect).

- 3 color values set the black, midtone, and white points (tritone effect)

The function could also accept a percentage (or number 0-1) for reducing the overall effect (blending with the original colors), equivalent to the parameter to the `sepia()` function.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/334#issuecomment-491095806 using your GitHub account

Received on Thursday, 9 May 2019 22:54:12 UTC