Get the color used in the image
I used this image.
colorthief.py
# -*- coding: utf-8 -*-
from colorthief import ColorThief
color_thief = ColorThief('imoyokan.jpg')
#The most used color
dominant_color = color_thief.get_color(quality=1)
print dominant_color
# (43, 37, 27)
#Divide the colors used into 6 types
palette = color_thief.get_palette(color_count=6)
print palette
# [(212, 173, 94), (42, 36, 27), (104, 64, 46), (123, 100, 46), (231, 199, 154), (73, 84, 78)]
Recommended Posts