Learn R Programming

shades (version 1.4.0)

warp: Shift colours between spaces

Description

This function shifts the current colour space of its arguments to the specified space, returning a new object of class "shade".

Usage

warp(x, space)

Arguments

x

An R object which can be coerced to class "shade".

space

A string naming the new space.

Value

A new object of class "shade".

Details

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.

References

Lam, K.M. (1985). Metamerism and colour constancy. PhD thesis, University of Bradford.

See Also

convertColor

Examples

Run this code
# NOT RUN {
warp("red", "HSV")
# }

Run the code above in your browser using DataLab