Seaborn light_palette including white in cmap

Viewed 617

Normally when using 1-color seaborn color palettes such as light_palette, the user doesn't care about the color white. However, since I am using this to pass a cmap into a pandas df.style object I want the minimum value to include white.

Basically I want this

sns.palplot(sns.light_palette("green"))

to include a white portion

n

1 Answers

You could use a cubehelix palette using start=2 for green, rot=0 to only have greens, dark=0.4 to have the darkest color not too dark and light=1 to have white as the lightest color:

import seaborn as sns
sns.palplot(sns.cubehelix_palette(start=2, rot=0, dark=0.4, light=1))

resulting palette

Related