Improve the colorization of mode changes