code: def cmd_cminv(self, ch=None):
          
          viewer = self.get_viewer(ch)
          if viewer is None:
              self.log("No current viewer/channel.")
              return
  
          viewer.invert_cmap()
docs: cminv ch=chname
  
          Invert the color map in the channel/viewer