Open ivikash opened 5 years ago
It seems the library doesn't have support for the Alpha channel in HEX values @ivikash. But in theory, is returning the correct value.
@ivikash just noticed that you are not using the toHex8String
method.
var tinycolor2 = require("tinycolor2")
const sheetsDefault = "#00857A"
console.log(tinycolor2(sheetsDefault).setAlpha(0.5).toString()). // "rgba(0, 133, 122, 0.5)"
console.log(tinycolor2(sheetsDefault).setAlpha(0.5).toHex8String()). // "#00857a80"
Hi,
.toHexString() is not returning the expected value. Attaching a runkit.
https://runkit.com/embed/dhv39902sm0k