Learn R Programming

colorplane (version 0.5.0)

as_rgb: convert to rgb colors

Description

convert to rgb colors

Usage

as_rgb(x, ...)

# S4 method for RGBColorPlane as_rgb(x)

# S4 method for HexColorPlane as_rgb(x)

# S4 method for ConstantColorPlane as_rgb(x)

Value

a numeric matrix of rgb components

Arguments

x

the object to convert

...

extra args

Examples

Run this code
cp <- IntensityColorPlane(seq(1,100), cols=rainbow(25))
cl <- map_colors(cp, irange=c(0,50))
rgbcols <- as_rgb(cl)

Run the code above in your browser using DataLab