Add code at the beginning of your print text and the message will appear in the respective color.
final String code;