Changed color extraction to use k-means