- From: Jonathan Neal via GitHub <sysbot+gh@w3.org>
- Date: Wed, 17 Jan 2018 21:43:52 +0000
- To: public-css-archive@w3.org
jonathantneal has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-color] blend() percentages are inverted? == Are the instructions for blending colors inverted? According to the [`color-mod()` spec](https://drafts.csswg.org/css-color/#funcdef-color-mod): ``` color-mod() = color( [ <color> | <hue> ] <color-adjuster>* ) ``` > The first argument specifies the **base color**... After the **base color**, zero or more `<color-adjuster>`s can be specified. Each `<color-adjuster>` modifies the color in some way, passing a new **base color** to the next `<color-adjuster>` in the list. Then later, according to the [`blend()` spec](https://drafts.csswg.org/css-color/#blend-adjuster): ``` blend( <color> <percentage> [rgb | hsl | hwb]? ) ``` > To determine the resulting color... linearly interpolate each of the channels of the colors according to the given `<percentage>`, where `0%` produces the specified `<color>` and `100%` produces the **base color**. This seems backwards. For example: ``` color-mod(blue blend(red 100%)) ``` In this example the **base color** is `blue` and is blended with `red` at `100%`, which produces ... `blue`? Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2195 using your GitHub account
Received on Wednesday, 17 January 2018 21:43:56 UTC