Converts a hex number/string representing a color and an alpha value to an RGBA tuple.
toRGBATuple('#fff', 0.5) // Returns '[255,255,255,0.5]'toRGBATuple('0x000', 1, '0x') // Returns '[0,0,0,1]' Copy
toRGBATuple('#fff', 0.5) // Returns '[255,255,255,0.5]'toRGBATuple('0x000', 1, '0x') // Returns '[0,0,0,1]'
Hex number/string representing a color.
The alpha level, between 0.0 - 1.0, inclusive.
Prefix of hex if using a string.
RGBA tuple in the format of [r, g, b, a].
[r, g, b, a]
Converts a hex number/string representing a color and an alpha value to an RGBA tuple.
Example