change the text color according to the mode