coloring of terminals