Then every image in a database could be labeled with its quantifyed index, and a particular query could look for pictures that have similar indices. In the line of what Szabolcs Sergyan mentioned, you should first establish which color features you would like to quantify for classifying the images.