postcss / postcss-color-function

PostCSS plugin to transform W3C CSS color function to more compatible CSS
MIT License
323 stars 31 forks source link

Please add support for fractional percentages #57

Open jwdallas opened 4 years ago

jwdallas commented 4 years ago

Hello, I’m trying to hit a specific rgb result value with my color transformations and finding there’s no support for fractional percentages.

Input

fire {
  color: color(rgba(29, 29, 31, 1) tint(4%));
}

water {
  color: color(rgba(29, 29, 31, 1) tint(4.3%));
}

Output

fire {
  color: rgb(38, 38, 40);
}

water {
  color: rgb(38, 38, 40);
}

Thanks for creating this wonderful polyfill. It’s been awesome to use.

Semigradsky commented 4 years ago

@jwdallas try https://github.com/jonathantneal/postcss-color-mod-function