postcss-color-function icon indicating copy to clipboard operation
postcss-color-function copied to clipboard

Color adjuster doesn’t work

Open jonathantneal opened this issue 8 years ago • 2 comments

Input CSS using the blackness adjuster:

body { background-color: color(#000 b(10%)) }

Result CSS after using the blackness adjuster:

body { background-color: rgb(230, 0, 0) }

That’s a bold red. Here’s an example:

https://codepen.io/jonneal/pen/a8843ad869e1f31d8448d7ab6dc65a18

Is this limited to the version of cssnext on CodePen or is this still a bug?

jonathantneal avatar Jun 02 '17 20:06 jonathantneal

Yeah, it is a bug.

color(black b(10%)) should represent the same color as hwb(0, 90%, 10%) (#e6e6e6)

See https://drafts.csswg.org/css-color/#hsl-hwb-adjusters for more information.

Semigradsky avatar Nov 03 '17 13:11 Semigradsky

The codepen link is broken... Here is a working pen, and the issue is still reproducible:

https://codepen.io/khs/pen/JpJmYr

kumarharsh avatar Feb 13 '18 07:02 kumarharsh