code: def add_cmap(name, clst):
      
      global cmaps
      assert len(clst) == min_cmap_len, \
          ValueError("color map '%s' length mismatch %d != %d (needed)" % (
              name, len(clst), min_cmap_len))
      cmaps[name] = ColorMap(name, clst)
docs: Add a color map.