skillfed

brewer2mpl

Connect colorbrewer2.org color maps to Python and matplotlib

brewer2mpl v1.4.1 90.4K downloads/30d#13,595 on PyPI816
Permissive license UNKNOWN AGING released

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 brewer2mpl

uv

uv add brewer2mpl

poetry

poetry add brewer2mpl

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Topic :: Scientific/Engineering :: Visualization

Tags

colorbrewer color maps pythonmatplotlib color palettessequential diverging qualitative colorscolor map library visualizationbrewer2mpl colorbrewer access
color-palettesmatplotlib-integrationdata-visualization

More Visualization packages