W3C home > Mailing lists > Public > public-fxtf-archive@w3.org > February 2018

Re: [fxtf-drafts] [filter-effects-2] Add a shorthand color-channel adjustment function similar to feComponentTransfer

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Thu, 22 Feb 2018 00:10:40 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issue_comment.created-367522301-1519258239-sysbot+gh@w3.org>
As such, I have a different suggested syntax:

```
component(<transfer-func>#)

<transfer-func> = <comp> <op> <amount>

<comp> = red | blue | green | alpha | rgb

<op> = '+' | '-' | '*' | '/'

<amount> = <number>
```

So your examples would be:

```
/* increase drop-shadow opacity while maintaining spread from the blur
   (assuming original element had strict 0 or 1 opacity) */
filter: drop-shadow(navy 5px 5px 3px) component(alpha * 1.5); 

/* the gooey effect
   (merges nearby shapes and colors & rounds corners, while recreating sharp edges) */
filter: blur(10px) component(alpha - 0.5, alpha * 4);

/* asymmetrical contrast adjustment,
   clamping almost-black to black without losing detail in almost-white areas */
filter: component(rgb - .02, rgb * calc(100 / 98));

/* white-balance adjustment, to create warmer hues */
filter: component(red * 1.1, blue * .95);
```

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/256#issuecomment-367522301 using your GitHub account
Received on Thursday, 22 February 2018 00:10:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:50:22 UTC