Fix color index overflow by reuse existed color in the vector. Fix #14293
Merge pull request #2725 from ulion/fix_color_index_overflow

Fix color index overflow by reuse existed color in the vector. Fix #14293