code: def _draw_gradient(self, hue):
          
          self.delete("gradient")
          self.delete("cursor")
          del self.gradient
          width = self.winfo_width()
          height = self.winfo_height()
  
          self.gradient = tk.PhotoImage(master=self, width=width, height=height)
  
          line = []
          for i in range(width):
              line.append(rgb_to_hexa(*hue2col(float(i) / width * 360)))
          line = "{" + " ".join(line) + "}"
          self.gradient.put(" ".join([line for j in range(height)]))
          self.create_image(0, 0, anchor="nw", tags="gardient",
                            image=self.gradient)
          self.lower("gradient")
  
          x = hue / 360. * width
          self.create_line(x, 0, x, height, width=2, tags='cursor')
docs: Draw the gradient and put the cursor on hue.