Learn R Programming

RgoogleMaps (version 1.5.1)

AddAlpha: add alpha level to color that lacks one

Description

add alpha level to color that lacks one

Usage

AddAlpha(plotclr, alpha = 0.5, verbose = 0)

Value

modified color with alpha value

Arguments

plotclr

color to be modified

alpha

alpha level

verbose

level of verbosity

Author

Markus Loecher

Examples

Run this code





#example: 


#require(RColorBrewer)


if (requireNamespace("RColorBrewer", quietly = TRUE)) {


  plotclr <- RColorBrewer::brewer.pal(8,"YlOrRd")


  plotclr = AddAlpha(plotclr,0.5)


} else {


  print("package RColorBrewer must be installed for this example")


}





Run the code above in your browser using DataLab