bgrins / TinyColor

Fast, small color manipulation and conversion for JavaScript
https://bgrins.github.io/TinyColor/
MIT License
5.05k stars 439 forks source link

Feature: include alpha in Hex #235

Closed itta611 closed 1 year ago

itta611 commented 2 years ago

Modern browsers allow to contain alpha values in Hex. (Ex. rgba(0, 0, 0, 0.5) = #00000080) However,

tinycolor('rgba(0, 0, 0, 0.3)').toHex()

will be #000000.

kilobyte2007 commented 1 year ago

There is a toHex8 for that already.

itta611 commented 1 year ago

thanks.