code: def set_color(self, color):
          
          if len(color) == 3:
              alpha = self.get()
          else:
              alpha = color[3]
          self._draw_gradient(alpha, color[:3])
docs: Change gradient color and change cursor position if an alpha value is supplied.
  
          :param color: new gradient color in RGB(A) format
          :type color: tuple[int]