Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function shifts the current colour space of its arguments to the
specified space, returning a new object of class "shade"
.
1 |
x |
An R object which can be coerced to class |
space |
A string naming the new space. |
Valid names for spaces are currently those supported by the
convertColor
function, namely “sRGB”, “Apple RGB”, “CIE
RGB”, “XYZ”, “Lab” and “Luv”; plus “RGB” (which is treated as an
alias for “sRGB”), “HSV”, “LCh” and “LMS”. Case is not significant.
A new object of class "shade"
.
LMS space, used for chromatic adaptation and simulating colour blindness, is not uniquely defined. Here we use the (linearised) Bradford transform, obtained by Lam (1985) and used widely in ICC colour profiles and elsewhere, to transform to and from CIE XYZ space.
R uses the D65 standard illuminant as the reference white for the “Lab” and “Luv” spaces.
Jon Clayden <code@clayden.org>
Lam, K.M. (1985). Metamerism and colour constancy. PhD thesis, University of Bradford.
1 | warp("red", "HSV")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.