powered by
extract the alpha channel
alpha_channel(x, ...)# S4 method for HexColorPlane alpha_channel(x, normalize = TRUE)# S4 method for ConstantColorPlane alpha_channel(x, normalize = TRUE)# S4 method for RGBColorPlane alpha_channel(x, normalize = TRUE)
# S4 method for HexColorPlane alpha_channel(x, normalize = TRUE)
# S4 method for ConstantColorPlane alpha_channel(x, normalize = TRUE)
# S4 method for RGBColorPlane alpha_channel(x, normalize = TRUE)
a numeric vector of alpha channel values
the object to extract alpha channel from
extra args
divide by 255
cp <- IntensityColorPlane(seq(1,5), cols=rainbow(25)) cl <- map_colors(cp, irange=c(0,50)) stopifnot(length(alpha_channel(cl)) == 5)
Run the code above in your browser using DataLab