Tag image to color palette python