alpha_channel-methods: alpha_channel

alpha_channelR 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)

bbuchsbaum/colorplane documentation built on March 12, 2023, 8:11 a.m.