The color codes in mIRC are inserted by using the Control+K key combination.
The actual control character inserted in the text is ascii character 3, seen
as ^C or inverse C on most UNIX clients.
The syntax of the color attribute in text has the format ^CN[,M]
N and M can be any number out of a range 0 to 15 thus allowing a range
of sixteen colors.
N will be the text (foreground) color, M a background color. A background
color is not always included. If no background color is set the receiving
client uses a default background color (white). Additionally you can use
color 99 to indicate a transparent color.
A plain ^C can be used to turn off all previous color attributes.
The Control+O key combination in mIRC inserts ascii character 15, which
turns off all previous attributes, including color, bold, underline,
Technically mIRC accepts the full number range 0 to 99. Thus N and M
can maximally be two digits long. The way these colors are interpreted
varies from client to client. Some map the numbers back to 0 to 15, others
interpret numbers larger than 15 as the default text color.
You can expect to see combinations like:
^C5,12colored text and background^C
^C3colored text ^C5,2more colored text and background^C
^C3,5colored text and background ^C8other colored text but same background^C
^C3,5colored text and background ^C8,7other colored text and different background^C
As you see the background color remains valid until it is changed or until
the entire color is switched off with a ^C. Of course lines can start with
colored text from the beginning and a closing ^C is not always given. To
specify a background color, a foreground color has to be given. So a ^C,8
attribute is not valid and thus ignored.
Note: if you want to color text that begins with numbers, this syntax requires
that you specify the color value as two digits.
The color indexes 0 to 15 represent the following colors:
|Index ||Color ||RGB |
|0 ||White ||(255,255,255) |
|1 ||Black ||(0,0,0) |
|2 ||Blue ||(0,0,127) |
|3 ||Green ||(0,147,0) |
|4 ||Light Red ||(255,0,0) |
|5 ||Brown ||(127,0,0) |
|6 ||Purple ||(156,0,156) |
|7 ||Orange ||(252,127,0) |
|8 ||Yellow ||(255,255,0) |
|9 ||Light Green ||(0,252,0) |
|10 ||Cyan ||(0,147,147) |
|11 ||Light Cyan ||(0,255,255) |
|12 ||Light Blue ||(0,0,252) |
|13 ||Pink ||(255,0,255) |
|14 ||Grey ||(127,127,127) |
|15 ||Light Grey ||(210,210,210) |
These colors are based on the VGA/XP/ANSI color table. Other IRC clients may use
slightly different colors for the above indexes.
mIRC also recognizes ANSI color escape codes in incoming messages and maps them
to the above indexes.