full implementation of colorTIE algorithm