# convert character string representing a color to RGB-code
# using alpha-channel of .25 (75\% transparent)
as.rgb("red", alpha=.25)
# same thing now using the RGB-code of red (alpha=1, i.e. as.rgb("red"))
as.rgb("#FF0000FF", alpha=.25)
Run the code above in your browser using DataLab