Python package colourmap generates an N unique colors from the specified input colormap.
conda install conda-forge::colourmap