Formatting colourised strings before inserting values