Palettable

jiffyclub.github.io ↗

Use one Python interface for several established colour-palette collections.

SI Score
80/100
Pricing
Open Source AI reading, not confirmed
Free plan
Not confirmed
Sign-up required
Not confirmed

Ask SI about Palettable

Answers use saved listing facts and recorded sources.
Homepage screenshot
Screenshot of the Palettable homepage

What it does

Palettable is a Python palette library, formerly called brewer2mpl. It gathers collections such as ColorBrewer, Tableau and cmocean behind a shared interface for plotting and other colour work. The code is open source, with notices that must stay with redistributed copies.

Palette names include the colour count: Dark2_7 has seven colours, and adding _r selects its reversed version. A palette object provides RGB values on a 0 to 255 scale, hex strings and Matplotlib-ready RGB values on a 0 to 1 scale.

For separate chart categories, build a ListedColormap from the colour list. The mpl_colormap attribute instead produces a continuous, interpolated map. These outputs serve different types of data.

The core library has no dependencies. Matplotlib is needed for its plotting and image-saving helpers; the block-display helper needs ipythonblocks. The permissive code licence allows modification and redistribution with its copyright and permission notices retained.

Strengths

  • Named palette variants include a reversed ordering.
  • The same palette object supplies numeric and hex representations.

Watch out for

  • Plotting, image saving and block previews require optional dependencies.

Best for

  • Python projects switching among established palette collections.

Sources