W3C home > Mailing lists > Public > public-fxtf-archive@w3.org > March 2019

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

From: Michael Mullany via GitHub <sysbot+gh@w3.org>
Date: Wed, 06 Mar 2019 01:02:18 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issues.opened-417573404-1551834136-sysbot+gh@w3.org>
gitmullany has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [filter-effects] Add recolor() shorthand ==
A popular request on StackOverflow in the css-filters tag is to use filters to recolor an input to a target color. This is trivial in SVG filters using the fifth column of feColorMatrix. In the absence of a recolor() shorthand in CSS, people are chaining together hue-rotate(), sepia(), invert() and saturate() filters to try to get to an approximation. It's both inefficient and inaccurate given hue-rotate's unfortunate tendency to clip result values. 

I would like to propose adding a new CSS filter shorthand - recolor() - that takes a single color value as its argument - to this spec section: https://www.w3.org/TR/filter-effects-1/#ShorthandEquivalents

13.1.11 recolor
```
<filter id="recolor">
  <feColorMatrix type="matrix"
             values="0 0 0 0 [unitized red channel value]
                           0 0 0 0 [unitized green channel value]
                           0 0 0 0 [unitized blue channel value]
                           0 0 0 1 0"/>
</filter>
```





Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/334 using your GitHub account
Received on Wednesday, 6 March 2019 01:02:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 6 March 2019 01:02:20 UTC