cmap
Scientific colormaps for python, without dependencies
Decision gist · record as of 2026-08-14
Yes. cmap is actively maintained, has no security vulnerabilities, a permissive license, and solves a real problem—providing scientific colormaps without matplotlib's overhead. It is well-suited for projects that need colormap functionality but want minimal dependencies. Install it if you work with visualization libraries that support cmap exports or if you need colormaps in a lightweight, numpy-only environment.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Input arrays passed to a Colormap must be normalized to the range 0–1; raw integer or unbounded data must be rescaled before mapping.
- Installation is straightforward with low friction—a pure Python wheel with only numpy as a runtime dependency.
- The project is actively maintained with recent commits and a stable release history since late 2022.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is a permissive open-source license; you can use, modify, and distribute cmap freely in commercial and private projects provided you include the license notice.
last release 2026-02-24 (171 days) · last repo commit 2026-08-12 · 188 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 161,434 downloads/mo, #10,634 on PyPI
Alternatives
Verify before relying
pip install cmap
import cmap
import numpy as np
cmap1 = cmap.Colormap(["red", "green", "blue"])
colors = cmap1(np.linspace(0, 1, 5))- Whether the package's type annotations and test coverage meet the stated 'strictly typed and fully tested' claim.
- Performance characteristics when mapping large numpy arrays to colors.
What it is and what it does
cmap is a lightweight Python library that bundles scientific colormaps from multiple sources—matplotlib, cmocean, colorbrewer, crameri, seaborn, and others—and makes them available without requiring matplotlib as a dependency. It provides two main objects: Color (a simple RGBA wrapper with conversion methods) and Colormap (a callable that maps scalar or array values to RGBA colors). The Colormap API mimics matplotlib's behavior, making it familiar to users already working with matplotlib, but cmap can be used standalone in any visualization context.
The library is designed for projects that need colormap functionality but want to avoid the overhead of installing matplotlib. It includes convenience methods to export colormaps to third-party formats compatible with napari, vispy, pygfx, plotly, bokeh, altair, earthengine-api, and pyqtgraph, making it a bridge between different visualization ecosystems. It requires only numpy at runtime and supports Python 3.9 and later.
Use it for
- Use it in a data visualization library that needs colormap support without forcing users to install matplotlib.
- Use it to map scientific data (images, arrays) to colors in napari, vispy, or other visualization frameworks.
- Use it to access perceptually uniform colormaps from cmocean or crameri in a lightweight, numpy-only context.
- Use it to build custom colormaps from color sequences and export them to multiple third-party visualization tools.
- Use it in headless or server-side applications where matplotlib's full feature set is unnecessary.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
cmap is actively maintained, has no security vulnerabilities, a permissive license, and solves a real problem—providing scientific colormaps without matplotlib's overhead. It is well-suited for projects that need colormap functionality but want minimal dependencies. Install it if you work with visualization libraries that support cmap exports or if you need colormaps in a lightweight, numpy-only environment.
Install
cmap on PyPI
Before you install
Installation is straightforward with low friction—a pure Python wheel with only numpy as a runtime dependency. The project is actively maintained with recent commits and a stable release history since late 2022.
Input arrays passed to a Colormap must be normalized to the range 0–1; raw integer or unbounded data must be rescaled before mapping.
License in practice
BSD-3-Clause is a permissive open-source license; you can use, modify, and distribute cmap freely in commercial and private projects provided you include the license notice.
Quickstart
pip install cmap
import cmap
import numpy as np
cmap1 = cmap.Colormap(["red", "green", "blue"])
colors = cmap1(np.linspace(0, 1, 5))
Verify before relying
- Whether the package's type annotations and test coverage meet the stated 'strictly typed and fully tested' claim.
- Performance characteristics when mapping large numpy arrays to colors.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 171 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 161,434 / month, #10,634 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9 |
Evidence: cmap-0.7.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “colormap library no matplotlib”
- cmapcmap provides a collection of scientific colormaps (from matplotlib,…
- cmcrameriProvides perceptually uniform colormaps by Fabio Crameri for…
- colorcetColorcet provides a collection of perceptually uniform colormaps…
Give your agent the search over MCP, or paste the wish link into any chat.
More Graphics packages
Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.
Install it if you need to work with images in Python—it is the de facto standard for this task.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.
PyMuPDF extracts, renders, converts, and manipulates PDF and other document formats (XPS, EPUB, images, Office files via Pro) with high performance, providing text, tables, images, and metadata with precise layout information.
The AGPL license requires careful review if you are building proprietary software—commercial licensing is available from Artifex.
pypdfium2 is a Python binding to PDFium that enables PDF rendering, inspection, manipulation, and creation through a ctypes interface to Google's PDFium library.
Install it if you need PDF rendering, inspection, or manipulation in Python; the medium install friction is offset by comprehensive platform support.
Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.
See also cmcrameri · cmweather · colourmap · colorcet · cmocean · brewer2mpl · palettable · distinctipy · basemap