ui control codes
IRC control codes are special characters that instruct compatible IRC clients to use certain text formatting (e.g. bold, underlined, or coloured text). To insert a control code you use a special keyboard shortcut (such as ctrl+b — that is, hold the “ctrl” key and press “b”). You will then see a square in the text field, which represents the control code.
Control codes supported by DMDirc
|Bold||Ctrl+b||Makes following text bold|
|Colour||Ctrl+k||Changes the foreground or background colour of the following text|
|Hex Colour||Ctrl+shift+k||Same as ctrl+k but uses a six-digit hex string instead of an IRC colour|
|Stop||Ctrl+o||Stops all formatting|
|Fixed width||Ctrl+shift+f||Makes following text fixed width|
|Italic||Ctrl+i||Makes following text italic|
|Underlined||Ctrl+u||Makes following text underlined|
Starting and stopping formatting
All control codes except Ctrl+o ('Stop') work in pairs — using the code once starts the formatting, and using the same code again stops the formatting. Colours are slightly more complicated: the starting code of a pair has some additional information after it to specify the colours (see the next section for more details). Finally, the Ctrl+o code stops all formatting that is currently in use — if you add bold and underline codes, type some text, then add the stop code, any text after it will have a normal weight and won't be underlined.
DMDirc supports two colour codes, standard 'IRC colours' and less common 'Hex colours'. There are sixteen IRC colours (numbered from 0 through to 15), while there are over sixteen million possible hex colours. Unfortunately only a relatively small number of clients support hex colours, so when communicating with people who don't use DMDirc you may find that they can't see them.
To start colouring text, you insert one of the two control codes (ctrl+k for IRC colours, ctrl+shift+k for hex colours), and then enter the foreground colour. For IRC colours this is a number between 0 and 16, while for hex colours it will be a six character hexadecimal (base 16, 0-9A-F) string. You can then optionally add a comma and a second colour for the background.
If you have DMDirc's Colour Picker Dialog enabled (Settings→Preferences, select the “GUI” tab and tick “Show colour dialog”, or use /set general showcolourdialog true in a window), you will see a small colour picker appear (see screenshots below). You can then click on a colour to insert the corresponding number or hex string. Hovering over a colour will allow you to see a larger preview at the bottom of the dialog. The slider on the right hand side of the hex colours dialog can be used to alter the saturation used; simply click anywhere on the slider and the colours on the left will update to use the new saturation.