alpha_channel {colorplane} | R Documentation |
alpha_channel
Description
extract the alpha channel
Usage
alpha_channel(x, ...)
## S4 method for signature 'HexColorPlane'
alpha_channel(x, normalize = TRUE)
## S4 method for signature 'ConstantColorPlane'
alpha_channel(x, normalize = TRUE)
## S4 method for signature 'RGBColorPlane'
alpha_channel(x, normalize = TRUE)
Arguments
x |
the object to extract alpha channel from |
... |
extra args |
normalize |
divide by 255 |
Value
a numeric vector of alpha channel values
Examples
cp <- IntensityColorPlane(seq(1,5), cols=rainbow(25))
cl <- map_colors(cp, irange=c(0,50))
stopifnot(length(alpha_channel(cl)) == 5)
[Package colorplane version 0.5.0 Index]