From WikiChip
Editing irc/colors
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | {{ | + | {{DISPLAYTITLE:IRC - colors}}{{Internet Relay Chat Guide}} |
− | '''IRC Colors''' (or '''[[ | + | '''IRC Colors''' (or '''[[mIRC]] Colors''') is a light-weight [[sub-protocol]] designed to added support for various text formatting to [[IRC]]. The protocol usually supports foreground, background, bold, italics, underline, and reverse. |
== Overview == | == Overview == | ||
− | Text formatting is done via a set of special character sequences that are parsed by the IRC client. Every new | + | Text formatting is done via a set of special character sequences that are parsed by the IRC client. Every new text format starts with one of the formatting control character. The same control character can be used at the end of the format in order to terminate it. The [[caret notation]] is used to represent such characters. For example, the ^B character is used to specify bold text. <code>^BHello World^B</code> will display on supported IRC client as <code>'''Hello World'''</code> |
− | |||
− | |||
=== Format characters === | === Format characters === | ||
Line 28: | Line 26: | ||
=== Color formatting === | === Color formatting === | ||
− | The sub-protocol supports both background and foreground coloring via the | + | The sub-protocol supports both background and foreground coloring via the 0x03 code point. On most IRC client, the character can be generated via the {{Key|Ctrl|K}} shortcut key. The syntax for coloring text is <code>^KN</code> for just foreground color or <code>^KN,M</code> for a background color as well. Where N and M represent any integer between 0 and 15 inclusively, allowing up to sixteen colors. <code>^K</code> alone can be used to terminate the previous sequence of colored text. |
While most client allow the user to change the meaning of those values, the default values are: | While most client allow the user to change the meaning of those values, the default values are: | ||
Line 50: | Line 48: | ||
| 6 || style="background-color:#9C009C; color:#FFFFFF;" | Purple || 156,0,156 || #9C009C | | 6 || style="background-color:#9C009C; color:#FFFFFF;" | Purple || 156,0,156 || #9C009C | ||
|- | |- | ||
− | | 7 || style="background-color:#FC7F00; color:#FFFFFF;" | | + | | 7 || style="background-color:#FC7F00; color:#FFFFFF;" | Olive || 252,127,0 || #FC7F00 |
|- | |- | ||
| 8 || style="background-color:#FFFF00; color:#000000;" | Yellow || 255,255,0 || #FFFF00 | | 8 || style="background-color:#FFFF00; color:#000000;" | Yellow || 255,255,0 || #FFFF00 | ||
Line 60: | Line 58: | ||
| 11 || style="background-color:#00FFFF; color:#000000;" | Cyan || 0,255,255 || #00FFFF | | 11 || style="background-color:#00FFFF; color:#000000;" | Cyan || 0,255,255 || #00FFFF | ||
|- | |- | ||
− | | 12 || style="background-color:#0000FC; color:# | + | | 12 || style="background-color:#0000FC; color:#000000;" | Royal blue || 0,0,252 || #0000FC |
|- | |- | ||
| 13 || style="background-color:#FF00FF; color:#000000;" | Magenta || 255,0,255 || #FF00FF | | 13 || style="background-color:#FF00FF; color:#000000;" | Magenta || 255,0,255 || #FF00FF | ||
Line 71: | Line 69: | ||
Any new sequence of colors will override the previous (or default). If the ^K character is used without any numbers, it will reset the text format back to default. If a color sequence defines a background color and a new color sequence starts without a background color, the previous background color will be used. For example <code style="border: #7F7F7F solid 1px;">^K0,1Hello ^4There!</code> will generate the <code style="border: #7F7F7F solid 1px; background-color: #000000;"><span style="color:#FFFFFF;">Hello </span><span style="color:#FF0000;">There!</span></code> | Any new sequence of colors will override the previous (or default). If the ^K character is used without any numbers, it will reset the text format back to default. If a color sequence defines a background color and a new color sequence starts without a background color, the previous background color will be used. For example <code style="border: #7F7F7F solid 1px;">^K0,1Hello ^4There!</code> will generate the <code style="border: #7F7F7F solid 1px; background-color: #000000;"><span style="color:#FFFFFF;">Hello </span><span style="color:#FF0000;">There!</span></code> | ||
− | Using the ^K character as a color terminator will not terminate any other | + | Using the ^K character as a color terminator will not terminate any other king of formatting such as bold. For example <code style="border: #7F7F7F solid 1px;">^B^K0,1Hello ^KThere!</code> will generate <code style="border: #7F7F7F solid 1px;"><span style="background-color: #000000; color:#FFFFFF">'''Hello'''</span> '''There!'''</code> where the bold continues on to the rest of the line. Using the ^O key, however, will restore all formats to default from that point onward. |
− | [[Category: | + | [[Category:Internet Relay Chat]] |