|
ANSI Colour
Help
What is ANSI? |
ANSI is a set of characters that a telnet client can interperate
as a colour, giving that it has support. ANSI is constructed
out of 4 characters, the only dynamic thing about it is the number; which tells
it which colour to use.
+ [ + number + m
Example: [40m What the client does is replace this string
of characters with a colour. This makes the example above represent the colour
black! | What is this ""? |
Being frank, this character is <esc>. Yes, the escape key! You
might have noticed that this character is not a normal character. This
character in a text file means that the escape key was inputted into the text
file. Other keys that can be inputed into a text file are backspace, insert,
and tab. By using a special program called an EMACS editor or copying the
character from some source, like this webpage, you can get the <esc> character. The
EMACS editors allow you to enter sequences of ALL keys (including escape), and
is one way to get the character. A far easier method for others would be to simply
select, copy, and paste the into whatever
file once you need it from this webpage. Remember <esc>
does not mean the text <esc>! It means the character that the escape
key gives into a text file. | How
do I correctly use ANSI? | As stated above,
the client interperates the ANSI colour code as a colour. The client replaces
the text with a colour. This colour will continue to be used until another is
specified. An example is shown as follows: [31m
red,[33m
yellow, yellow again, and[31m
red[0m
red, yellow,
yellow again, and red One
rule that is important to follow is to not overlap the same colour twice, this
results in some clients being unable to fully interperate the colours and results
in colour errors. Take a look at the example of my Half-Orc whois. It does not
overlap colours, it uses the same colour as long as it can until it switches to
another and it has [0m
after each line. Always end your text with [0m which
disables ANSI and prevents you from messing up a client! | How
do I put this into MUME? | You need a client
that supports local editing. Local editing is a special transfering protocal that
your client can use to send the text to the MUME server, not all clients support
this. Then you might have to (it matters with some clients) "change
editor mume" in MUME aswell as "#identify" to set up your client
and MUME to be able to do local editing. In PowTTY you have to enable local editing
on the last tab in the options, or if you can't figure it out download Powtty
version 1.01 which has automatically enabled local editing here.
Now, when you try to change your whois, view mume-mail, or post an idea the client
will pop up another program, usually being notepad. Within this progran you can
paste/write what you want to add. To send the file to mume you have to save and
then exit the text program. The client will automatically read the file after
it has been closed and send it to the MUME server. Good luck! Some clients
that SUPPORT local editing are Powwow, Cancan, CS2,
and PowTTY. Zmud, JMC, and other clients that don't support local editing
CAN NOT send ANSI to MUME. Recommended
clients are... Windows: PowTTY
Unix: Powwow Mac: None present |
Here is an example of
Jahara's Half-Orc WHOIS
[32m~-_
_-~[0m
[31m<[33mo[31m> <[33mo[31m>[0m
[32m\._./[0m
[37m^
^[0m
[37m\[0m
==[32m<><><><>[37m===>>==========---------------[0m
[37m/[0m |
~-_
_-~
<o>
<o>
\._./
^ ^
\
==<><><><>===>>==========---------------
/ |
Foreground
Colors | Black... |
[30m | Red..... | [31m |
Green... | [32m |
Yellow.. | [33m |
Blue.... | [34m |
Magenta. | [35m |
Cyan.... | [36m |
White... | [37m |
|
High Colors |
Black... | [90m |
Red.... | [91m |
Green... | [92m |
Yellow.. | [93m |
Blue.... | [94m |
Magenta. | [95m |
Cyan.... | [96m |
White... | [97m |
| * I usually don't use
High Colours, they aren't supported by all clients and using a bold colour before
a colour does practically the same thing as using a high colour. |
Background
Colors |
Black... | [40m |
Red..... |
[41m |
Green... | [42m |
Yellow.. |
[43m |
Blue.... | [44m |
Magenta. |
[45m |
Cyan.... | [46m |
White... |
[47m | |
Text Style Attributes |
Bold........ |
[1m |
Underline... | [4m |
|
[5m |
Inverse..... | [7m |
Strikethough |
[8m |
Ansi off.... | [0m |
| * Bold makes the colour
lighter, not the text bigger. |
| |