Closed getflourish closed 5 years ago
When getting the hex string of a non saturated color, a fully saturated color is returned.
The example compares a color with saturation = 1 and saturation = 0, whereas 1 returns full saturation. While 2 returns low saturation.
https://codepen.io/getflourish/pen/WYVNoV
let a = tinycolor({ h: 0, s: 0, l: 52 }).toHexString() let b = tinycolor({ h: 0, s: 1, l: 52 }).toHexString() let c = tinycolor({ h: 0, s: 2, l: 52 }).toHexString()
Oh, I figure, I should explicitly add "%" to the values.
When getting the hex string of a non saturated color, a fully saturated color is returned.
The example compares a color with saturation = 1 and saturation = 0, whereas 1 returns full saturation. While 2 returns low saturation.
https://codepen.io/getflourish/pen/WYVNoV