code: def ok(self):
          
          rgb, hsv, hexa = self.square.get()
          if self.alpha_channel:
              hexa = self.hexa.get()
              rgb += (self.alpha.get(),)
          self.color = rgb, hsv, hexa
          self.destroy()
docs: Validate color selection and destroy dialog.