colorcet, a collection of perceptually uniform colormaps for scientific plots
A set of useful perceptually uniform colormaps for plotting scientific data
At a glance
- What is it?
- holoviz/colorcet gathers more than a hundred perceptually uniform colormaps into a single Python package that works with matplotlib, bokeh, holoviews and datashader, all derived from Peter Kovesi's 2015 set. The point is that a uniform colormap makes the lightness variation in your data readable rather than decorative.
- Who is it for?
- Adopt colorcet when you plot scientific data and your current colormap hides structure in the data because lightness and colour vary together. Skip it if you need a brand palette or a sequential ramp for a dashboard rather than a perceptually uniform map.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 13 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 24, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What perceptually uniform means here
Colorcet is a collection of perceptually uniform colormaps for use with Python plotting programs like bokeh, matplotlib, holoviews and datashader, based on the set of perceptually uniform colormaps created by Peter Kovesi at the Center for Exploration Targeting.
The idea of perceptual uniformity comes from a 1996 paper from IBM, and the detailed method for the maps themselves is described in Peter Kovesi's 2015 arXiv paper, both of which the README links.
What the property buys is specific. In a colormap that is not perceptually uniform, the perceived lightness change across the ramp is uneven, so the same numerical difference in your data produces a different perceived difference in colour depending on where it sits in the range. A perceptually uniform map makes the perceived difference roughly proportional to the data difference everywhere, which means a feature that stands out does so because of its value rather than because of where it happens to fall in the colour range.
That is the whole argument for using this over the defaults, and it is a stronger argument than aesthetics. A plot that looks attractive can still mislead, and the usual cause is a colormap whose lightness curve is not linear.
The package also exists as a convenience layer over a set that already existed. The Matplotlib project has its own related resources, including the viscm tool for creating maps like the four in matplotlib, the cmocean site collecting maps made with viscm, and a discussion of how the matplotlib maps were created. Colorcet consolidates the useful ones into something pip-installable and usable from any of the plotting libraries.
The maps with short, memorable names are highlighted in the README as the ones that are probably the most useful, with the complete set of more than a hundred shown in the user guide.
Installing it and getting the maps into a plot
Colorcet supports Python 3.10 and greater on Linux, Windows and Mac, and it installs with conda:
conda install colorcetor with pip:
python -m pip install colorcetThere is also a development channel, installed from the pyviz label:
conda install -c pyviz/label/dev colorcetThat third option is worth knowing about if you want the features that landed between releases, and the README points at the getting started page for more.
The practical question is how the maps reach your plot. The package is a data package first, so the maps are available as arrays that you pass to whichever library you use. With matplotlib you would hand the array to a colormap and then set it on the plot; with bokeh or holoviews the same array is what a palette is built from. The point of the package is that the same map name and the same data are available whichever library you are in, so a figure in a paper and a figure in a dashboard can use the same colours without you maintaining a copy of the ramp.
Because the maps are just arrays, you can also load them without the plotting stack at all, which matters if you are generating images in a service that has no GUI and does not want matplotlib installed.
The repository layout reflects that. There is a colorcet/ directory holding the package itself, an assets/ directory with the images, a doc/ directory holding the documentation, a scripts/ directory, a pixi.toml for the development environment, a pyproject.toml with setuptools and setuptools_scm for the build, and a .pre-commit-config.yaml.
The licence field on the repository reports it as a custom licence GitHub cannot classify, with the terms in a LICENSE.txt file. The underlying maps come from Peter Kovesi's work, so before you redistribute them in a product, read that file and check what it says about attribution and about the provenance of the map data.
Where it fits against the alternatives
The alternatives come in two kinds, and the choice depends on what problem you are solving.
If the problem is that your colormap is not perceptually uniform, the alternatives are the cmocean collection, the four matplotlib colormaps, or the viscm tool for building your own. The README mentions the cmocean site, which collects a set of maps created with viscm. Colorcet is broader, with more than a hundred maps covering more kinds of data, and it is the one that travels across bokeh, holoviews and datashader as well as matplotlib.
If the problem is something else, a colormap is the wrong tool. A diverging map for data with a meaningful midpoint, a categorical palette for a plot with a handful of series, or a sequential ramp tuned to your own data range are all separate choices, and the standard libraries have good defaults for them.
The comparison with the Matplotlib built-ins is worth making carefully, because it is a common misconception that Matplotlib ships non-uniform maps. It does ship perceptually uniform maps, the viridis family being the well known one. What colorcet adds is the breadth: where Matplotlib offers a handful of well chosen defaults, colorcet offers a large catalogue with named variants for particular data types, and the naming scheme means you can ask for a map suited to your kind of data rather than trying the defaults until one works.
There is a real downside to a large catalogue, and it is that choosing well becomes your problem. With four defaults you pick one and move on; with a hundred maps you can spend an afternoon cycling through them, and you will end up with a figure that is hard to reproduce because you picked a variant you cannot name later. The README naming the short, memorable maps as probably the most useful is advice to limit the search.
The other cost is size and dependency weight. A package of a hundred colormaps is not large, but it is another dependency in an environment, and the dev channel can bring in changes to the map data itself between releases, which is worth knowing if your figures need to be reproducible across a dependency upgrade.
Using the maps well and what to check
Picking a map is the easy half. Three habits make the difference between a colormap that helps and one that gets in the way.\n\nFirst, check that the data range and the map range match. A perceptually uniform map is uniform over its own domain, and if your data only occupies a narrow part of that domain, you have thrown away most of the perceptual resolution the map was designed to provide. Rescaling the data to the full range, or choosing a map whose range fits the data, recovers it.\n\nSecond, think about what the reader has to decode. A sequential map asks the reader to read magnitude from colour alone, which is hard. A diverging map with a meaningful centre lets the reader see direction, and a second encoding such as contour lines or a labelled point overlay makes the values readable rather than merely distinguishable.\n\nThird, check greyscale. If your figure will end up in a printed report, a photocopy or a printer that is out of colour cartridges, a map that relies on hue to separate categories will fail. A lightness-ordered sequential map survives that; a red-green map does not, and red-green colour blindness makes it fail for a substantial fraction of readers even in colour.\n\nThe verification step is straightforward. Render the same figure with the colormap you use today and with a colorcet map, and look for the feature you were trying to show. If it becomes visible, the map was the problem. If it does not, the problem is elsewhere, and no colormap will fix it.\n\nOn maintenance, the version history shows v3.1.0 in February 2024 and then v3.2.0 and v3.2.1 both on the same day in April 2026, with the last push on 2026-10-12. The project is part of the HoloViz ecosystem alongside bokeh, holoviews and datashader, which means the maps are used in production by the same people who maintain the libraries that consume them, and that the catalogues stay coherent with what those libraries support.
Editorial conclusion
Adopt colorcet when you plot scientific data and your current colormap hides structure in the data because lightness and colour vary together. Skip it if you need a brand palette or a sequential ramp for a dashboard rather than a perceptually uniform map. Verify first by rendering the same data with your current colormap and with a colorcet map, and check that the features you want to see become visible rather than merely differently coloured.
Frequently asked questions
What is colorcet and where do the colormaps come from?
It is a collection of perceptually uniform colormaps for plotting scientific data in Python, based on the set created by Peter Kovesi at the Center for Exploration Targeting. The methods are described in Kovesi's 2015 arXiv paper, with background in a 1996 paper from IBM.
How do I install colorcet?
With conda using conda install colorcet, or with pip using python -m pip install colorcet. There is also a development channel at conda install -c pyviz/label/dev colorcet for the features that landed between releases. Python 3.10 and greater is required.
Which plotting libraries does colorcet work with?
bokeh, matplotlib, holoviews and datashader, all of which are named in the README. Because the maps are distributed as plain arrays, they can also be loaded without any plotting library installed.
How does colorcet compare with cmocean?
The README lists the cmocean site as a related resource; it collects a set of maps created with viscm. Colorcet is broader, with more than a hundred maps across more data types, and is usable from the bokeh, holoviews and datashader stack as well.
Why does my plot look flat even with a perceptually uniform colormap?
Usually because the data only occupies a narrow part of the colormap's domain, which throws away the perceptual resolution the map provides. Rescaling the data to the full range, or choosing a map whose range matches the data, recovers the difference. If the feature is still not visible after that, the colormap was not the problem.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/holoviz-colorcet)Was this useful?