polarLUV: Create polarLUV (HCL) Colors

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

View source: R/colorspace.R

Description

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

Usage

1
polarLUV(L, C, H, names)

Arguments

L, C, H

these arguments give the L, C and H coordinates of the colors. The values can be provided in separate L, C and H 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 polarLUV space is a transformation of the CIE L*u*u* space so that the u and u values are converted to polar coordinates. The radial component C measures chroma and the angular coordinate H is measures hue. It is also known as the HCL (hue-chroma-luminance) space.

Value

An object of class polarLUV which inherits from class color.

Author(s)

Ross Ihaka

See Also

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

Examples

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

Example output

             R         G        B
[1,] 0.2655087 0.5308088 0.871805
            L        C        H
[1,] 76.00763 52.18057 240.4397

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