R/addAlpha.R

Defines functions addAlpha

addAlpha 		<- function(col, alpha=1){
    ## Defines a color with transparency ratio alpha
    if(missing(col))
        stop("Please provide a vector of colours.")
    apply(sapply(col, col2rgb)/255, 2, function(x) rgb(x[1], x[2], x[3], alpha=alpha))  
}
christophrust/FunRegPoI documentation built on April 10, 2022, 2:22 p.m.