code: def save_colormap(self, name=None):
          
          if name == None: name = self.get_name()
          if name == "" or not type(name)==str: return "Error: invalid name."
  
          # get the colormaps directory
          colormaps = _os.path.join(_settings.path_home, 'colormaps')
  
          # make sure we have the colormaps directory
          _settings.MakeDir(colormaps)
  
          # assemble the path to the colormap
          path = _os.path.join(_settings.path_home, 'colormaps', name+".cmap")
  
          # open the file and overwrite
          f = open(path, 'w')
          f.write(str(self._colorpoint_list))
          f.close()
  
          return self
docs: Saves the colormap with the specified name. None means use internal
          name. (See get_name())