Convert HSL Color Specification to RGB

DESCRIPTION:

Create a character vector of RGB values based on hue, saturation, and lightness (HSL). This is a similar color space to HSV, but is parameterized differently.

USAGE:

hsl(h=1, s=1, l=0.5, gamma=1, alpha=1)

OPTIONAL ARGUMENTS:

h
Hue specified as a numeric between 0 and 1. Single value or vector.
s
Saturation specified as a numeric between 0 and 1. Single value or vector.
l
Lightness specified as a numeric between 0 and 1. Single value or vector. This is also called the luminance.
gamma
Gamma correction specified as a numeric between 0 and 1. Single value or vector.
alpha
Alpha specified as a numeric between 0 and 1. Single value or vector.

VALUE:

Character vector of RGB values such as "#FF0000" if alpha is not specified, or "#FF000080" including alpha.

SIDE EFFECTS:

None.

SEE ALSO:

, , .

EXAMPLES:

# Piechart with colors generated using hsl()
pie(rep(1, 16), col=hsl(h=seq(0.1, 0.9, length=16), s=0.75, l=0.6))