LUV: Create LUV Colors

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

View source: R/colorspace.R

Description

This function creates colors of class “LUV”; a subclass of the virtual color-class class.

Usage

1
LUV(L, U, V, names)

Arguments

L, U, V

these arguments give the L, U and V coordinates of the colors. The values can be provided in separate L, U and V vectors or in a three-column matrix passed as L.

names

a vector of names for the colors (by default the row names of L are used).

Details

The L, U and V values give the coordinates of the colors in the CIE (1976) L*u*v* space. This is a transformation of the 1931 CIE XYZ space which attempts to produce perceptually based axes. Luminance takes values between 0 and 100, and the other coordinates take values between -100 and 100. The a and b coordinates measure positions on green/red and blue/yellow axes.

Value

An object of class LUV which inherits from class color.

Author(s)

Ross Ihaka

See Also

RGB, HSV, XYZ, LAB, polarLAB, polarLUV.

Examples

1
2
3
4
5
6
7
## Show the LUV space
set.seed(1)
x <- RGB(runif(1000), runif(1000), runif(1000))
y <- as(x, "LUV")
head(x)
head(y)
plot(y)

Example output

             R         G        B
[1,] 0.2655087 0.5308088 0.871805
            L        U        V
[1,] 76.00763 -25.7427 -45.3886

colorspace documentation built on May 2, 2019, 12:49 p.m.