Most IRC clients will accept caret notation for formatting IRC text.
The general formula for colors is ^CN,M
.
^C
is ASCII character 3 (usually represented as \x03
in code). N
is the text (foreground) color, M
is the background color. A background color is not always included. If no background color is set, the receiving client uses the default background color. Additionally, you can use color 99 to indicate the default color.