I have the following colorbar :
from matplotlib import cm
cmap = matplotlib.cm.Blues
bounds = [0, 500, 1000, 1500, 2000, 2500]
norm = matplotlib.colors.BoundaryNorm(bounds, cmap.N , extend = 'max')
plt.colorbar(matplotlib.cm.ScalarMappable(norm=norm, cmap=cmap), orientation='vertical')
Is there a way to get the hex codes of the six colors generated?
Thanks!