Wrote find best color function