…not, tinycolor tries to guess if a value is a percentage and sometimes ends up guessing wrong.
If you look at documentation for tinycolor, you can look at inputToRGB() method. For saturation and lightness, it calls convertToPercentage() method, and this method looks like this:
function convertToPercentage(n) {
if (n <= 1) {
n = (n * 100) + "%";
}
return n;
}
So, if we have saturation and lightness values of a very low percentage like 0.5 (i.e. half a percent), it thinks that this is not a percentage and multiplies by 100.
…not, tinycolor tries to guess if a value is a percentage and sometimes ends up guessing wrong.
If you look at documentation for tinycolor, you can look at inputToRGB() method. For saturation and lightness, it calls convertToPercentage() method, and this method looks like this:
So, if we have saturation and lightness values of a very low percentage like 0.5 (i.e. half a percent), it thinks that this is not a percentage and multiplies by 100.
This pull request fixes #140 .