Java port of Lokesh Dhakar Color Thief (grab color palette from an image)