From WikiChip
Difference between revisions of "irc/colors"

(Created page with "'''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 ...")
 
Line 2: Line 2:
  
 
== Overview ==
 
== Overview ==
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 U+0002 character is used to specify bold text. <code>^Hello World^</code> will display on supported IRC client as <code>'''Hello World'''</code>  
+
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 9: Line 9:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Format !! [[Code point]] !! [[keyboard shortcuts|Shortcuts]]
+
! Format !! [[Code point]] !! [[keyboard shortcuts|Shortcuts]] !! Example
 
|-
 
|-
| Bold || 0x02 || {{Key|Ctrl|B}} / {{Key|Cmd|B}}
+
| Bold || 0x02 || {{Key|Ctrl|B}} / {{Key|Cmd|B}} || <code>^BAA^BBB^BCC^BDD</code> = <code>'''AA'''BB'''CC'''DD</code>
 
|-
 
|-
| Italics || 0x1D || {{Key|Ctrl|I}} / {{Key|Opt|Cmd|I}}
+
| Italics || 0x1D || {{Key|Ctrl|I}} / {{Key|Opt|Cmd|I}} || <code>^IAA^IBB^ICC^IDD</code> = <code>''AA''BB''CC''DD</code>
 
|-
 
|-
| Underline || 0x1F || {{Key|Ctrl|U}} / {{Key|Opt|Cmd|U}}
+
| Underline || 0x1F || {{Key|Ctrl|U}} / {{Key|Opt|Cmd|U}} || <code>^UAA^UBB^UCC^UDD</code> = <code>{{Underline|AA}}BB{{Underline|CC}}DD</code>
 
|-
 
|-
| Reverse || 0x16 || {{Key|Ctrl|R}} / {{Key|Opt|Cmd|R}}
+
| Reverse || 0x16 || {{Key|Ctrl|R}} / {{Key|Opt|Cmd|R}} || <code>^RAA^RBB^RCC^RDD</code> = <code><span style="background:black;color:white;">AA</span>BB<span style="background:black;color:white;">CC</span>DD</code>
 
|-
 
|-
| Plain || 0x0F || {{Key|Ctrl|O}} / {{Key|Opt|Cmd|O}}
+
| Plain || 0x0F || {{Key|Ctrl|O}} / {{Key|Opt|Cmd|O}} || <code>^I^B^UAAA^OBBB</code> = <code>'''''{{Underline|AAA}}'''''BBB</code>
 
|}
 
|}
 +
 +
The plain text character is used to restore all formatting back to default.
  
  
 
[[Category:Internet Relay Chat]]
 
[[Category:Internet Relay Chat]]

Revision as of 14:13, 10 May 2014

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

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. ^BHello World^B will display on supported IRC client as Hello World

Format characters

Most clients support at least bold and underline. Below are the common shortcuts for those characters:

Format Code point Shortcuts Example
Bold 0x02 Ctrl+B / Cmd+B ^BAA^BBB^BCC^BDD = AABBCCDD
Italics 0x1D Ctrl+I / Opt+ Cmd+I ^IAA^IBB^ICC^IDD = AABBCCDD
Underline 0x1F Ctrl+U / Opt+ Cmd+U ^UAA^UBB^UCC^UDD = AABBCCDD
Reverse 0x16 Ctrl+R / Opt+ Cmd+R ^RAA^RBB^RCC^RDD = AABBCCDD
Plain 0x0F Ctrl+O / Opt+ Cmd+O ^I^B^UAAA^OBBB = AAABBB

The plain text character is used to restore all formatting back to default.