bgrins / spectrum

The No Hassle JavaScript Colorpicker
https://bgrins.github.io/spectrum/
MIT License
2.32k stars 588 forks source link

hex8: rgba vs argb #427

Closed bh-ms2soft closed 6 years ago

bh-ms2soft commented 8 years ago

For the preferred hex8 method why do you opt to use argb vs rgba order in hex bytes? : https://github.com/bgrins/spectrum/blob/master/spectrum.js#L1728

Especially when rgba will be supported by css: https://drafts.csswg.org/css-color/#hex-notation

I'd like to see support for hex8a or something or other that goes by rgba in hex.

bgrins commented 8 years ago

That was originally added for microsoft's 'filter' syntax which puts the alpha in front. I'd be happy to migrate away from that (inlining the current rgbaToHex implementation into toFilter and switching the function to use the new standard way).

Would you be interested in sending over a PR to https://github.com/bgrins/TinyColor to fix this?

bh-ms2soft commented 6 years ago

Glad to see this went through.