- Parameters:
- n_colors : int
Number of colors in the palette.
- h : float
The value of the first hue.
- l : float
The lightness value.
- s : float
The saturation intensity.
- as_cmap : bool
If True, return a matplotlib colormap object.
- Returns:
- palette
list of RGB tuples or matplotlib.colors.ListedColormap
Examples
By default, return 6 colors with identical lightness and saturation and evenly-sampled hues:
Increase the number of colors:
Change the start-point for hue sampling:
Return a continuous colormap. Notice the perceptual discontinuities, especially around yellow, cyan, and magenta:
sns.hls_palette(as_cmap=True)