RGBColorPlane-class: RGBColorPlane

RGBColorPlane-classR Documentation

RGBColorPlane

Description

RGBColorPlane constructor taking a 3- or 4-column numeric matrix of RGB(A) colors in the 0-255 range.

Usage

RGBColorPlane(clr)

Arguments

clr

a matrix of colors where the first column is red, second column is green, third column is blue, and optional fourth column is alpha.

Value

a new RGBColorPlane instance

Examples


rgba_cmat <- rbind(c(255,0,0,255),
              c(0, 255, 0, 255),
              c(0, 0, 255, 0))

cp <- RGBColorPlane(rgba_cmat)
stopifnot(all(cp@clr[1,] == c(255,0,0,255)))


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