Reorganizing node and edge coloring