先pip install haishoku
import pprint
from haishoku.haishoku import Haishoku
image = 'test.png'
haishoku = Haishoku.loadHaishoku(image)
print(haishoku.dominant)
Haishoku.showDominant(image)
pprint.pprint(haishoku.palette)
Haishoku.showPalette(image)