This package is officially published under @voxelprismatic/hextorgba
on NPM.
Don't use this gist, as it uses Number
, which conveniently breaks down at 12bit wide color channels with alpha channel
(#RRRGGGBBBaaa
). The NPM package uses BigInt, which goes up and beyond 20bit wide color channels.
The NPM package also supports returning array (default), object, percentages as array, and CSS rgb(...)