getHSLPalette#
Purpose#
Create a set of evenly spaced colors in HSL hue space. The h, s, and l arguments must all be between 0 and 1.
Format#
- clrs = getHSLPalette(ncolors[, h[, s[, l]]])#
- Parameters:
ncolors (scalar) – The number of colors to create for the palette.
h (scalar) – Optional input, first hue. Default value is 0.01.
s (scalar) – Optional input, saturation. Default value is 0.65.
l (scalar) – Optional input, lightness. Default value is 0.6.
- Returns:
clrs (ncolorsx1 string array) – contains the newly created color palette.
Examples#
// Get the first 3 colors HSL colors
hsl_clrs = getHSLPalette(3);
After the above code, hsl_clrs should equal:
#db5f57
#57db5f
#5f57db
See also
Functions getColorPalette()
, listColorPalettes()
, getHSLuvPalette()
, blendColorPalette()