Dominant color algorithm fixed