Skip to content

Instantly share code, notes, and snippets.

@variablenix
Created November 11, 2017 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save variablenix/8b472f6ccfa5f109990fc29f45b4dab2 to your computer and use it in GitHub Desktop.
Save variablenix/8b472f6ccfa5f109990fc29f45b4dab2 to your computer and use it in GitHub Desktop.

Most IRC clients will accept caret notation for formatting IRC text.

Colors

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.

Color codes

Number Name
00 white
01 black
02 blue (navy)
03 green
04 red
05 brown (maroon)
06 purple
07 orange (olive)
08 yellow
09 light green (lime)
10 teal (a green/blue cyan)
11 light cyan (cyan / aqua)
12 light blue (royal)
13 pink (light purple / fuchsia)
14 grey
15 light grey (silver)

Example

Red text on a blue background would be:

jenni.reply("\x0304,02Example\x03")

Other formatting

Code Meaning
\x02 bold
\x03 colored text
\x1D italic text
\x1F underlined text
\x16 swap background and foreground colors ("reverse video")
\x0F reset all formatting

Need help?

Contact us here.

Keywords

control characters, IRC colors, IRC colours, caret notation

@kaibruneji
Copy link

О Дарвин! Единственный человек сделавший НОРМАЛЬНУЮ статью про цвета в IRC, где инф. подана хорошо и она ВЕРНАЯ, и есть РАБОЧИЙ ПРИМЕР! Всем остальным, засравшим интернет говно-статьями бесполезными - найти и оторвать руки по самые ноги! Спасибо тебе автор! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment