seaborn.
dark_palette
(color, n_colors=6, reverse=False, as_cmap=False, input=’rgb’)¶Make a sequential palette that blends from dark to color
.
This kind of palette is good for data that range between relatively uninteresting low values and interesting high values.
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 the IPython notebook, you can also choose this palette
interactively with the choose_dark_palette()
function.
Parameters: |
|
---|---|
Returns: |
|
See also
light_palette
diverging_palette
Examples
Generate a palette from an HTML color:
>>> import seaborn as sns; sns.set()
>>> sns.palplot(sns.dark_palette("purple"))
Generate a palette that decreases in lightness:
>>> sns.palplot(sns.dark_palette("seagreen", reverse=True))
Generate a palette from an HUSL-space seed:
>>> sns.palplot(sns.dark_palette((260, 75, 60), input="husl"))
Generate a colormap object:
>>> from numpy import arange
>>> x = arange(25).reshape(5, 5)
>>> cmap = sns.dark_palette("#2ecc71", as_cmap=True)
>>> ax = sns.heatmap(x, cmap=cmap)