R/00-utility.R

Defines functions makeTransparent

## pass alpha on 0-255 scale
makeTransparent<-function(someColor, alpha=100) {
  newColor<-col2rgb(someColor)
  apply(newColor, 2, function(curcoldata){
    rgb(red=curcoldata[1], green=curcoldata[2], blue=curcoldata[3],
        alpha=alpha, maxColorValue=255)})
}

Try the RCytoGPS package in your browser

Any scripts or data that you put into this service are public.

RCytoGPS documentation built on Feb. 11, 2021, 3:01 a.m.