seaborn.light_palette#

seaborn.light_palette(color, n_colors=6, reverse=False, as_cmap=False, input='rgb')#

Make a sequential palette that blends from light to color.

The color parameter can be specified in a number of ways, including all options for defining a color in matplotlib and several additional color spaces that are handled by seaborn. You can also use the database of named colors from the XKCD color survey.

If you are using a Jupyter notebook, you can also choose this palette interactively with the choose_light_palette() function.

Parameters:
colorbase color for high values

hex code, html color name, or tuple in input space.

n_colorsint, optional

number of colors in the palette

reversebool, optional

if True, reverse the direction of the blend

as_cmapbool, optional

If True, return a matplotlib.colors.ListedColormap.

input{‘rgb’, ‘hls’, ‘husl’, xkcd’}

Color space to interpret the input color. The first three options apply to tuple inputs and the latter applies to string inputs.

Returns:
palette

list of RGB tuples or matplotlib.colors.ListedColormap

See also

dark_palette

Create a sequential palette with dark low values.

diverging_palette

Create a diverging palette with two colors.

Examples

Define a sequential ramp from a light gray to a specified color:

sns.light_palette("seagreen")

Specify the color with a hex code:

sns.light_palette("#79C")

Specify the color from the husl system:

sns.light_palette((20, 60, 50), input="husl")

Increase the number of colors:

sns.light_palette("xkcd:copper", 8)

Return a continuous colormap rather than a discrete palette:

sns.light_palette("#a275ac", as_cmap=True)
blend color map