apply_alpha: Add alpha to hex color
Description
Applies alpha (or opacity) to a color in hexadecimal form by
converting opacity in the [0, 1]
range to hex in the [0, 255]
range
and appending to the hex color.
Usage
apply_alpha(color_hex, opacity = 0.5)
Arguments
color_hex
A character string representing a hex color
opacity
Desired opacity of the output color