code: def _reset_preview(self, event):
          
          label = event.widget
          label.master.focus_set()
          label.master.configure(relief="sunken")
          args = self._old_color
          if self.alpha_channel:
              args += (self._old_alpha,)
              self.alpha.set(self._old_alpha)
              self.alphabar.set_color(args)
          color = rgb_to_hexa(*args)
          h, s, v = rgb_to_hsv(*self._old_color)
          self.red.set(self._old_color[0])
          self.green.set(self._old_color[1])
          self.blue.set(self._old_color[2])
          self.hue.set(h)
          self.saturation.set(s)
          self.value.set(v)
          self.hexa.delete(0, "end")
          self.hexa.insert(0, color.upper())
          self.bar.set(h)
          self.square.set_hsv((h, s, v))
          self._update_preview()
docs: Respond to user click on a palette item.