Program to sort image by color