colours.rst 1.53 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
Milliways Colour reference
==========================

Description
===========

This document describes the text colouration options provided by Milliways
client. The legacy system refers to ANSI-16 colouring, and the updated
one to ANSI-256 support.

Legacy
======
The existing colour scheme only permitted access to the 16 colour ANSI 
system and is a little awkward to use.

Each colour sequence is preceded by the Escape character, typically
entered by pressing control-V followed by the ESC key, this is followed
by two letters, the first setting the foreground colour, the second
setting the background colour, lowercase letters being the normal brightness
version, and uppercase being the brightly/intense coloured version.

* -n : Reset / Default Colour
* kK : Black
* rR : Red
* gG : Green
* bB : Blue
* cC : Cyan
* mM : Magenta
* yY : Yellow
* wW : white

ANSI 256
========

For the updated colour scheme sequences are now delimited by the ampersand &
character and consist of a number of hex digits seperated by colons.

Text modes are a single hex character, colours are pairs of hex characters,
     the first colour pair being the foreground colour, the optional second
     setting the background colour.

Alice Mitchell's avatar
Alice Mitchell committed
42 43
Text modes:

44 45 46 47 48 49 50 51
* 0 - Reset / normal
* 1 - Bold / increased intensity
* 2 - Faint / decreaed intensity
* 3 - Italic
* 4 - Underline
* 7 - reverse video
* 9 - crossed out

52
Examples:  
Alice Mitchell's avatar
Alice Mitchell committed
53

54 55 56 57 58
* &0& - reset all attributes
* &36& - set foreground colour to purple
* &11:E3& - dark blue text on yellow background

For a full colour chart, run ~alice/ansi256.sh