Seaborn chart colors are different than those specified by palette

Viewed 2528

Why are seaborn chart colors different from the colors specified by the palette?

The following two charts show the difference between the colors as they appear on a bar chart, and the colors as they appear in the palette plot. You can see if yo ulook carefully, that the colors on the bar chart are slightly less bright/saturated.

Why are these different, and how can I get the bar chart to have the exact same colors as the ones specified in the palette?

import seaborn as sns
sns.set(style="white")
titanic = sns.load_dataset("titanic")

colors = ["windows blue", "amber", "greyish", "faded green", "dusty 
purple"]

ax = sns.countplot(x="class", data=titanic, 
palette=sns.xkcd_palette(colors))
sns.palplot(sns.xkcd_palette(colors))

Bar chart
Bar chart

Palette plot
Palette plot

1 Answers
Related