Return the alpha transparency per R color

col2alpha(x, maxValue = 1, ...)

Arguments

x

R compatible color, either a color name, or hex value, or a mixture of the two. Any value compatible with col2rgb.

maxValue

numeric maximum value to return, useful when the downstream alpha range should be 255. By default maxValue=1 is returned.