1. A method in a computing system for generating a detector to detect a dominant color of an image, the method comprising: providing a collection of training images; for each training image, identifying candidate dominant colors of the training image; extracting features of the candidate dominant colors of the training image; and inputting indications of dominance of the candidate dominant colors to the training image; and training a detector to detect a dominant color of the image using the extracted features and indications of dominance of the candidate dominant colors wherein the identifying of candidate dominant colors of the training image includes quantizing the colors of the training image into bins; calculating average colors of the bins; calculating weights of the bins; and clustering the average colors of the bins factoring in the weight of the bins, the clustered average colors representing the candidate dominant colors; wherein the clustering includes successively creating a combined color for a pair of colors whose difference is smallest; and wherein the combined color is a weighted combination of the pair of colors and has a combined weight derived from the weights of the pair of colors.