maximize color distance algo is working