R: Create HLS Colors

HLS {colorspace} | R Documentation

## Create HLS Colors

### Description

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

### Usage

    HLS(H, L, S, names)

### Arguments

`H,L,S` | These arguments give the hue, lightness, and saturation of the colors. The values can be provided in separate `H`, `L` and `S` vectors or in a three-column matrix passed as `H`.
`names` | A vector of names for the colors (by default the row names of `H` are used).

### Details

This function creates colors in the HLS color space which corresponds to the standard sRGB color space (IEC standard 61966). The hues should lie between between 0 and 360, and the lightness and saturations should lie between 0 and 1.

### Value

An object of class “HLS” which inherits from class “color.”

### Author(s)

Ross Ihaka

### References

www.srgb.com

### See Also

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

### Examples

    # A rainbow of full-intensity hues
    HLS(seq(0, 360, length=13)[-13], 0.5, 1)

[Package colorspace version 1.3-2 Index]