code: def cmd_cm(self, nm=None, ch=None):
          
          viewer = self.get_viewer(ch)
          if viewer is None:
              self.log("No current viewer/channel.")
              return
  
          if nm is None:
              rgbmap = viewer.get_rgbmap()
              cmap = rgbmap.get_cmap()
              self.log(cmap.name)
  
          else:
              viewer.set_color_map(nm)
docs: cm nm=color_map_name ch=chname
  
          Set a color map (name `nm`) for the given channel.
          If no value is given, reports the current color map.