def mplcmap_to_palette(cmap):
    if colors is None:
        raise ValueError("Using cmaps on objects requires matplotlib.")
    colormap = cm.get_cmap(cmap) #choose any matplotlib colormap here
    return [colors.rgb2hex(m) for m in colormap(np.arange(colormap.N))]
Converts a matplotlib colormap to palette of RGB hex strings."
dataset/ETHPy150Open ioam/holoviews/holoviews/plotting/bokeh/util.py/mplcmap_to_palette