I have a simple code that picks the most dominant colors of an image:
from colorthief import ColorThief
color_thief = ColorThief('c:/users/dora/projects/python/album-gradient/test.jpg')
palette = color_thief.get_palette(color_count=2, quality=1)
print(palette)
This returns a list of RGB values like such: [(4, 4, 4), (226, 75, 20), (4, 162, 221)]
How can I use this list to create a 3-color gradient and then save it as an image?