code: def select_cb(self, viewer, event, data_x, data_y):
          
          if not (self._cmxoff <= data_x < self._cmwd):
              # need to click within the width of the bar
              return
  
          i = int(data_y / (self._cmht + self._cmsep))
          if 0 <= i < len(self.cm_names):
              name = self.cm_names[i]
              msg = "cmap => '%s'" % (name)
              self.logger.info(msg)
  
              channel = self.fv.get_channel_info()
              if channel is not None:
                  viewer = channel.fitsimage
                  #viewer.onscreen_message(msg, delay=0.5)
                  viewer.set_color_map(name)
docs: Called when the user clicks on the color bar viewer.
          Calculate the index of the color bar they clicked on and
          set that color map in the current channel viewer.