update sort-colors
update c++ and python version of sort-colors