A lightweight package for generating visually distinct colours.
Slowing down. Last release over 2 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install distinctipy
distinctipy is a lightweight python package providing functions to generate colours that are visually distinct from one another.
Commonly available qualitative colormaps provided by the likes of matplotlib generally have no more than 20 colours, but for some applications it is useful to have many more colours that are clearly different from one another. distinctipy can generate lists of colours of any length, with each new colour added to the list being as visually distinct from the pre-existing colours in the list as possible.
Installation
distinctipy is designed for Python 3 and can be installed with pip by running:
python -m pip install distinctipy
Alternatively clone the repo and install it locally:
git clone https://github.com/alan-turing-institute/distinctipy.git
cd distinctipy
python -m pip install .
Optional Dependencies
Starting in version 1.2.1 distinctipy no longer bundles matplotlib, pandas or dev dependencies in the default installation. If you wish to view
colours (e.g. with distinctipy.color_swatch) or examples you will need matplotlib and pandas installed. To do this, either install distinctipy
with the optional flag: