slightly change dominant color detection algorithm