Description Usage Arguments Details Value Examples
Functions for standardizing R color strings.
Note that the mapcol function can used to map between color spaces.
| 1 2 3 4 | 
| cols | A character vector/matrix/array, including color names or hex values for sRGB/sRGB-A space. | 
| single.flag | Logical, if true, return a single TRUE/FALSE value. | 
| nchannels | Integer, either three or four, determining the number of output channels. | 
| as.list, as.array | Logical values, if true, return a list or array, see value section. | 
| ... | Ignored. | 
The is.opaque function is used to test if the input contains any non-opaque colors.
The standardize.cols function converts all colors into a hex strings.
The result will be all 3 channel or 4 channel values, not a mixture of two.
The vt3.prep.cols function is a combination of the two functions above.
By default, is.opaque returns a single logical value.
If single.flag is false, it returns a logical vector/matrix/array matching the dimensions of cols.
By default, standardize.cols returns a character vector/matrix/array matching the dimensions of cols.
If as.list or as.array are true, it returns a list or array, respectively.
In lists, each element corresponds to each channel, and in arrays, the last dimension corresponds to each channel.
vt3.prep.cols returns a length two list, containing the opaque flags and the standardized colors.
| 1 2 3 4 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.