Skip to content

Instantly share code, notes, and snippets.

@blaylockbk
Created February 4, 2019 21:41
Show Gist options
  • Save blaylockbk/8f7e32e1a1c03ff43265a807b8121e3d to your computer and use it in GitHub Desktop.
Save blaylockbk/8f7e32e1a1c03ff43265a807b8121e3d to your computer and use it in GitHub Desktop.
List of colors from a color map
import matplotlib
# Generate a list of colors
cmap = matplotlib.cm.get_cmap('Spectral')
# Retrieve 19 colors from the colormap
colors = cmap(np.arange(19)/19)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment