Tint and Shade functions ignore the amount parameter
Johann13 opened this issue · 3 comments
Johann13 commented
The functions to create a tint or shade for a color have a paramater amount.
Currenly this is the library code
TinyColor tint([int amount = 10]) {
return this.mix(input: Color.fromRGBO(255, 255, 255, 1.0));
}
TinyColor shade([int amount = 10]) {
return this.mix(input: Color.fromRGBO(0, 0, 0, 1.0));
}
skylerknight commented
I'm having the same issue. When using the shade function the result is always pure black. I hope this gets fixed soon. Cheers!
NicolasDionB commented
I found that too!! That's an easy fix I think!!
NicolasDionB commented
Easy workaround for tint, you can do: Color.alphaBlend(Colors.white.withOpacity(amount / 100), color);
and for shade: Color.alphaBlend(Colors.black.withOpacity(amount / 100), color);
. Works like a charm.