Converts a hex number/string representing a color and an alpha value to an RGBA string.
toRGBAString('#fff', 0.5) // Returns 'rgba(255,255,255,0.5)'toRGBAString('0x000', 1, '0x') // Returns 'rgba(0,0,0,1)' Copy
toRGBAString('#fff', 0.5) // Returns 'rgba(255,255,255,0.5)'toRGBAString('0x000', 1, '0x') // Returns 'rgba(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 string.
Converts a hex number/string representing a color and an alpha value to an RGBA string.
Example