Add transparency to the selected colours.
makeTransparent(colour, alpha)
A R colour
A value between 0 and 1 that defines the transparency 0 for full transparency and 1 for no transparency
Return a colour with the provided level of transparency.
makeTransparent('black',0.5)
#> [1] "#00000080"
makeTransparent('black',1:10/10)
#> [1] "#0000001A" "#00000033" "#0000004C" "#00000066" "#00000080" "#00000099"
#> [7] "#000000B2" "#000000CC" "#000000E6" "#000000"
makeTransparent(rainbow(10), 1:10/10)
#> [1] "#FF00001A" "#FF990033" "#CCFF004C" "#33FF0066" "#00FF6680" "#00FFFF99"
#> [7] "#0066FFB2" "#3300FFCC" "#CC00FFE6" "#FF0099"