0.11.2
  • Gallery
  • Tutorial
  • API
  • Site
      • Introduction
      • Release notes
      • Installing
      • Example gallery
      • Tutorial
      • API reference
      • Citing
      • Archive
  • Page
      • seaborn.husl_palette

seaborn.husl_palette¶

seaborn.husl_palette(n_colors=6, h=0.01, s=0.9, l=0.65, as_cmap=False)¶

Get a set of evenly spaced colors in HUSL hue space.

h, s, and l should be between 0 and 1

Parameters
n_colorsint

number of colors in the palette

hfloat

first hue

sfloat

saturation

lfloat

lightness

Returns
list of RGB tuples or matplotlib.colors.Colormap

See also

hls_palette

Make a palette using evently spaced circular hues in the HSL system.

Examples

Create a palette of 10 colors with the default parameters:

>>> import seaborn as sns; sns.set_theme()
>>> sns.palplot(sns.husl_palette(10))
../_images/seaborn-husl_palette-1.png

Create a palette of 10 colors that begins at a different hue value:

>>> sns.palplot(sns.husl_palette(10, h=.5))
../_images/seaborn-husl_palette-2.png

Create a palette of 10 colors that are darker than the default:

>>> sns.palplot(sns.husl_palette(10, l=.4))
../_images/seaborn-husl_palette-3.png

Create a palette of 10 colors that are less saturated than the default:

>>> sns.palplot(sns.husl_palette(10, s=.4))
../_images/seaborn-husl_palette-4.png

Back to top

© Copyright 2012-2021, Michael Waskom. Created using Sphinx 3.3.1.