warp: Shift colours between spaces

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

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

Usage

1
warp(x, space)

Arguments

x

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

space

A string naming the new space.

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.

Value

A new object of class "shade".

Note

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.

Author(s)

Jon Clayden <code@clayden.org>

References

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

See Also

convertColor

Examples

1
warp("red", "HSV")

shades documentation built on Aug. 2, 2019, 5:05 p.m.