Moved text colour calculation into Trace::get_text_colour