mIRC control codes ONLY work in mIRC (and other IRC clients).

@OP
You need to find documentation that explains how the rtf format creates colors, underlines, etc. Click

-genius_at_work