code: def ginga_to_matplotlib_cmap(cm, name=None):
      
      if name is None:
          name = cm.name
      from matplotlib.colors import ListedColormap
      carr = np.asarray(cm.clst)
      mpl_cm = ListedColormap(carr, name=name, N=len(carr))
      return mpl_cm
docs: Convert Ginga colormap to matplotlib's.