A numeric array with two or more dimensions.
(Such as the result of standardize.cols with as.array=TRUE.
The last dimension should have three or four levels, which represent channels.
x, y, z, alpha
Numeric vectors.
Alternative way of specifying color.
as.list, as.string
Logical, if true, return a list or string, see value section.
from
String, the input color space.
to
String, the output color space.
Ignored, if as.string is true.
correction
Logical, correct the sRGB values.
Ignored, unless converting HCL to sRGB.
…
Ignored.
Value
By default, these functions return arrays.
Where the last dimension corresponds to channel.
If as.string is true, a character vector/matrix/array is returned.
If as.list is true, a list is returned, with one element per channel.
Details
The functions wrap functions from the colorspace package.
The to and from arguments, use names of color spaces from the colorspace package.
This includes:
"XYZ", "RGB", "sRGB", "LAB", "polarLAB", "HSV", "HLS", "LUV" and "polarLUV".
In addition to HCL, with is the same as polarLUV, but the the arguments in a different order.
The same labels are used for three channel and four channel images.