brewer2mpl
Connect colorbrewer2.org color maps to Python and matplotlib
What it is and what it does
brewer2mpl is a pure Python package that bundles all 165 color maps from ColorBrewer2.org and makes them accessible programmatically. It requires no internet connection since the color data ships with the package. You can retrieve color maps by name, type (sequential, diverging, qualitative), and number of colors, then access the colors in multiple formats: raw RGB 0-255 triplets, hex strings, or matplotlib-normalized RGB 0-1 triplets.
The package wraps each color map in a BrewerMap object with attributes for the map name, color count, and matplotlib integration. You can generate matplotlib colormaps directly or access maps through direct module imports (e.g., `qualitative.Dark2[7]`). However, the package is no longer maintained—the last release was in 2014—and the author has directed new users to Palettable, its successor.
Use it for:
- Generate consistent, publication-quality color palettes for matplotlib plots without hardcoding RGB values.
- Build data visualization tools that need pre-vetted, colorblind-friendly color schemes for categorical or continuous data.
- Access ColorBrewer2 palettes in Python scripts without requiring internet access or manual color definition.
- Create static color maps for scientific or business dashboards using sequential or diverging schemes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides access to all 165 ColorBrewer2.org color maps (sequential, diverging, qualitative) as Python objects with RGB, hex, and matplotlib-compatible color formats.
Yes, if you need ColorBrewer2 colors and are already using matplotlib or have a stable Python environment. The package has no dependencies, installs easily, and carries no security vulnerabilities. However, consider Palettable instead if you want active maintenance and ongoing feature updates—brewer2mpl has not been updated since 2014 and is explicitly superseded by its successor.
Install
brewer2mpl on PyPI
pip
pip install brewer2mpluv
uv add brewer2mplpoetry
poetry add brewer2mplInstalling brewer2mpl
Before you install
Low install friction with no runtime dependencies. Package is aging—last release was 2014-09-19 and no updates since—but the repository remains active and unarchived. The maintainer has redirected users to Palettable as the successor project.
License in practice
Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions.
Quickstart
pip install brewer2mpl
import brewer2mpl
bmap = brewer2mpl.get_map('Paired', 'Qualitative', 5)
print(bmap.hex_colors)
Verify before relying
- Whether the package works reliably with modern Python versions beyond those listed in classifiers (2.6, 2.7, 3.x unspecified).
- Current compatibility with recent matplotlib versions for mpl_colormap generation.
Package facts
| License | UNKNOWN (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 4,347 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,356/month — #13,595 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: brewer2mpl-1.4.1-py2.py3-none-any.whl
Tags
More Visualization packages
matplotlib creates static, animated, and…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
plotlyPlotly is an interactive, browser-based…
permissive · top 1,000 on PyPI
graphvizGenerates DOT language source code for graph…
permissive · top 1,000 on PyPI
streamlitStreamlit transforms Python scripts into…
permissive · top 1,000 on PyPI
leatherLeather is a lightweight Python charting…
permissive · top 1,000 on PyPI
palettablePalettable provides a library of color palettes…
permissive · top 5,000 on PyPI
cmapcmap provides a collection of scientific…
permissive · top 15,000 on PyPI
colourmapGenerates unique RGB and HEX colors from input…
permissive · top 15,000 on PyPI
cyclerCycler provides composable style cycles for…
permissive · top 1,000 on PyPI
coloredColored provides ANSI/VT100 escape sequences…
permissive · top 5,000 on PyPI
epaper-ditheringConverts images to dithered output optimized…
permissive · top 15,000 on PyPI
cmcrameriProvides perceptually uniform colormaps by…
permissive · top 15,000 on PyPI
distinctipyGenerates lists of visually distinct colors of…
permissive · top 15,000 on PyPI
coloraideColorAide is a pure Python library for…
permissive · top 15,000 on PyPI
colorhashGenerates deterministic colors from any object…
permissive · top 15,000 on PyPI