Added coloring functions for different cases of insertion