Skip to main content
Albero Academy

Color Palettes

Choose the right palette type — qualitative, sequential, diverging.

Applied Seaborn8 min

Seaborn's colour palettes are a core strength. Choosing the right type of palette for your data — like colormaps in Matplotlib — is what makes a chart clear rather than misleading.

The three types

Palette typeUse forExamples
QualitativeDistinct categoriesdeep, muted, Set2, tab10
SequentialOrdered low→highviridis, rocket, mako, Blues
DivergingMeaningful midpointcoolwarm, vlag, icefire
setting palettes
sns.set_palette("Set2") # default for all charts
sns.barplot(data=tips, x="day", y="tip", palette="muted") # per chart
sns.color_palette("viridis", as_cmap=True) # a colormap for heatmaps
sns.color_palette("husl", 8) # 8 evenly-spaced distinct hues

Key takeaways

  1. 01Qualitative palettes (deep, Set2) distinguish categories.
  2. 02Sequential palettes (viridis, rocket) encode ordered magnitude.
  3. 03Diverging palettes (coolwarm, vlag) show deviation from a midpoint.
  4. 04set_palette sets a global default; palette= sets per-chart; prefer colour-blind-safe options.

Finished this chapter?

Mark it complete to track your progress through Seaborn.