Seaborn Color Palettes: Interactive Explorer and Selection Guide
Updated on
A seaborn color palette is an ordered list of colors that seaborn hands to your plots — one color per category for bar and line charts, or a continuous ramp for heatmaps. You change it in one line:
import seaborn as sns
sns.set_palette("colorblind") # global default for every plot after this
sns.barplot(data=df, x="day", y="total", hue="sex", palette="deep") # one plot only
sns.heatmap(corr, cmap="vlag", center=0) # continuous data uses cmap, not paletteThree things to remember before the details:
palette=takes discrete colors and belongs on categorical plots (barplot,boxplot,lineplotwithhue).cmap=takes a continuous colormap and belongs onheatmap,kdeplot, and other density plots.- Seaborn's default is
deep. If the figure is going to be published or shared, switch it tocolorblind.
The explorer below shows every named palette with its actual hex values. Click a color bar to copy the call.
Interactive reference
Seaborn Palette Explorer
Seaborn’s named palettes with their real hex values. Click a color bar to copy the color_palette() call, or use the second button to set it as the global default.
Categorical palettes
Seaborn's six named qualitative palettes. They share the same hue order and differ only in saturation and lightness, so switching between them keeps category-to-color mapping stable.
- deepqualitative
Seaborn's default since 0.8. Balanced saturation, safe for slides and papers.
- mutedqualitative
Lower saturation than deep. Good when many series overlap.
- pastelqualitative
Light and low contrast. Best for filled areas with dark labels on top.
- brightqualitative
High saturation. Reads well on projectors and dark backgrounds.
- darkqualitative
Deep tones. Pairs with light backgrounds and thin lines.
- colorblindqualitativeCB-safe
Built from the Okabe-Ito set. Use this when the figure is published or shared widely.
- tab10qualitative
Matplotlib's default cycle, reachable from Seaborn by name.
Evenly spaced hue palettes
Generated by walking a color circle, so they scale to any number of categories. husl keeps perceived brightness even; hls does not.
- husl (8)qualitative
Evenly spaced in HUSL space — hues look equally bright.
- husl (12)qualitative
Same generator with more categories. Past ~10 series, add markers too.
- hls (8)qualitative
Evenly spaced in HLS. Yellow and green read brighter than blue.
Sequential palettes
For ordered, low-to-high data: heatmaps, density, counts. Seaborn registers rocket, mako, flare and crest in addition to Matplotlib's.
- rocketsequentialCB-safe
Seaborn's default heatmap map. High dynamic range, dark at the top.
- makosequentialCB-safe
Blue-green counterpart to rocket. Good for a second heatmap in the same figure.
- flaresequentialCB-safe
Rocket's range without the near-black end — better for line and point colors.
- crestsequentialCB-safe
Mako's range without the near-black end. Pairs with flare.
- viridissequentialCB-safe
Matplotlib's perceptually uniform default, available by name in Seaborn.
- BluessequentialCB-safe
Single-hue ColorBrewer ramp. Prints cleanly in grayscale.
- cubehelixsequentialCB-safe
Linearly increasing brightness — survives grayscale printing.
- light_palette("seagreen")sequential
Build a ramp from white to any color you name.
- dark_palette("#69d")sequential
Build a ramp from near-black to any color you name.
Diverging palettes
Two ramps meeting at a neutral midpoint. Use for correlations, residuals, or change-versus-baseline — and always center the scale.
- vlagdivergingCB-safe
Seaborn's blue-to-red diverging map with a light midpoint.
- icefirediverging
Dark-midpoint counterpart to vlag. Strong on dark themes.
- coolwarmdivergingCB-safe
Matplotlib's classic. Good default for correlation heatmaps.
- Spectraldiverging
Rainbow-flavored diverging map. Readable, but not colorblind safe.
- diverging_palette(220, 20)diverging
Generate a custom diverging map from two hue angles.
Hex values resolved from Seaborn 0.13.2 on Matplotlib 3.11.1. Continuous palettes are sampled at 32 points. Append _r to any name (rocket_r, crest_r) to reverse it.
- How to Use DeepSeek Harness: Install, Set Up, and Run Your First Agent
- Runcell Science: An Open Source Alternative to Claude Science for Research Workflows
- How to Make Mac Not Sleep: Keep Codex, Claude Code, and AI Agents Running
- OpenClaw vs ZeroClaw vs Pi Agent vs Nanobot: Which AI Agent Stack Should You Choose in 2026?
- Can Claude Code Analyze Jupyter Notebooks for Data Science? What It Actually Does
- Claude Code Routines: Why AI Agent Cron Jobs Matter
- Claude Code Desktop Bypass Permissions: How to Enable It
- How to Build Two Python Agents with Google’s A2A Protocol - Step by Step Tutorial
- Top 10 growing data visualization libraries in Python in 2025
Quick syntax reference
| What you want | Code |
|---|---|
| Set the default for the whole script | sns.set_palette("colorblind") |
| Set palette and theme together | sns.set_theme(style="whitegrid", palette="deep") |
| One plot only | sns.barplot(..., hue="col", palette="Set2") |
| Get the color list to inspect or reuse | sns.color_palette("deep") |
| Get hex strings | sns.color_palette("deep").as_hex() |
| Preview a palette in a notebook | sns.color_palette("rocket", 8) (renders swatches) |
| Limit to N colors | sns.color_palette("husl", 5) |
| Continuous colormap for a heatmap | sns.heatmap(df, cmap="rocket") |
| Reverse any palette | append _r: "rocket_r", "crest_r" |
| Map specific categories to specific colors | palette={"A": "#4c72b0", "B": "#dd8452"} |
| Reset to seaborn defaults | sns.set_theme() |
The decision table
This is the part people usually get wrong: matching the palette type to the data, not just picking a palette that looks nice.
| Your variable | Palette type | Use | Avoid | Colorblind-safe pick |
|---|---|---|---|---|
| Unordered categories (product, country, species) | Qualitative | deep, muted, colorblind, Set2 | Any sequential ramp — it implies a ranking that is not there | colorblind |
| Ordered categories (S / M / L, quartiles) | Sequential, sampled | sns.color_palette("Blues", 4) | Qualitative — it hides the order | Blues, crest |
| Continuous, low to high (counts, revenue, density) | Sequential | rocket, mako, flare, crest, viridis | Rainbow maps such as jet | mako, viridis |
| Continuous, centered on zero (correlation, change, residuals) | Diverging | vlag, coolwarm, icefire | Sequential — it makes the midpoint arbitrary | vlag |
| More than 10 categories | Circular | sns.color_palette("husl", n) | Any 10-color palette recycled | none reliably — add markers or facets |
| Cyclic (hour of day, angle) | Cyclic | sns.color_palette("twilight", as_cmap=True) | Sequential — midnight and 23:59 look far apart | twilight |
Two traps worth calling out:
Diverging without centering. sns.heatmap(corr, cmap="vlag") on data from -0.2 to 0.9 puts the neutral color at 0.35, so weak positive correlations look "neutral". Always pass center=0:
sns.heatmap(corr, cmap="vlag", center=0, vmin=-1, vmax=1, annot=True)Sequential for categories. palette="Blues" on a five-category bar chart tells the reader that the darkest bar is "most" of something. If the categories have no order, use deep or colorblind.
The six named qualitative palettes
Seaborn's deep, muted, pastel, bright, dark, and colorblind all use the same hue order. Only saturation and lightness differ, so you can swap between them without remapping which category gets which hue.
import seaborn as sns
for name in ["deep", "muted", "pastel", "bright", "dark", "colorblind"]:
print(name, sns.color_palette(name).as_hex()[:3])deep ['#4c72b0', '#dd8452', '#55a868']
muted ['#4878d0', '#ee854a', '#6acc64']
pastel ['#a1c9f4', '#ffb482', '#8de5a1']
bright ['#023eff', '#ff7c00', '#1ac938']
dark ['#001c7f', '#b1400d', '#12711c']
colorblind ['#0173b2', '#de8f05', '#029e73']Practical selection:
- deep — the default. Fine for exploration and internal decks.
- muted — many overlapping series, or large filled areas where full saturation is tiring.
- pastel — filled shapes that carry dark text or markers on top.
- bright — projectors and dark backgrounds.
- dark — thin lines on a light background.
- colorblind — anything you publish. Derived from the Okabe-Ito set, so it survives the common forms of color vision deficiency.
Seaborn's own continuous palettes
Beyond Matplotlib's colormaps, seaborn registers four of its own:
| Name | Range | Best for |
|---|---|---|
rocket | near-black through red to light cream | heatmaps where you want the top of the range to pop |
mako | near-black through blue-green to light | a second heatmap in the same figure, so the two are distinguishable |
flare | rocket's hues without the near-black end | line, point, and marker colors — dark colors stay legible on white |
crest | mako's hues without the near-black end | pairs with flare for two ordered series |
The flare / crest distinction matters more than it sounds: rocket and mako bottom out near black, which is fine for a filled heatmap cell but unreadable as a thin line on a white page.
import seaborn as sns
# heatmap: the dark end is fine
sns.heatmap(matrix, cmap="rocket")
# ordered lines: use flare so no series is nearly black
sns.lineplot(data=df, x="month", y="value", hue="cohort", palette="flare")Building a custom palette
When brand colors or a specific hue are required, build the ramp instead of hunting for a named match.
import seaborn as sns
# White -> your color
sns.light_palette("seagreen", as_cmap=True)
# Near-black -> your color
sns.dark_palette("#69d", as_cmap=True)
# Custom diverging map from two hue angles (0-359)
sns.diverging_palette(220, 20, as_cmap=True)
# Grayscale-safe sequential ramp
sns.cubehelix_palette(start=.5, rot=-.75, as_cmap=True)
# Explicit list — full control
brand = ["#0f4c81", "#e8743b", "#19a979", "#945ecf"]
sns.set_palette(sns.color_palette(brand))To pin specific categories to specific colors — so "churned" is always red across every chart in a report — pass a dict:
status_colors = {"active": "#0173b2", "churned": "#d55e00", "trial": "#de8f05"}
sns.barplot(data=df, x="month", y="users", hue="status", palette=status_colors)Common errors
| Message or symptom | Cause | Fix |
|---|---|---|
ValueError: The palette list has fewer values than needed | Fewer colors than categories | Use a generator palette: sns.color_palette("husl", n_categories) |
Passing 'palette' without assigning 'hue' is deprecated and will be removed in v0.14.0 | palette= used with no hue= (seaborn 0.13+) | Set hue to the same column as x, plus legend=False |
KeyError: "'deep' is not a valid value for colormap." | Qualitative palette passed to cmap= | Use a colormap name (rocket, vlag) for cmap= |
| Palette applies to only one plot | palette= is per-call | Use sns.set_palette(...) or sns.set_theme(palette=...) |
Colors reset after plt.style.use() | The style sheet overrides the cycle | Call sns.set_palette() after the style |
| Heatmap midpoint looks wrong | Diverging map without centering | Pass center=0 |
Related Guides
- Matplotlib Colormaps: Interactive Explorer — the full Matplotlib gallery, since every Matplotlib colormap name also works in seaborn.
- Seaborn Heatmap — where
cmapandcenterdecide whether the figure is readable. - Seaborn Barplot — the most common home for a qualitative palette.
- Seaborn Lineplot — multi-series color with
hueandpalette. - Seaborn vs Matplotlib — how the two libraries divide styling responsibilities.
- Matplotlib Colormap: Complete Guide — normalization, colorbars, and custom colormap construction.