head	1.4;
access;
symbols
	NUTS333:1.4
	NUTS332:1.4
	NUTS331:1.3
	NUTS330:1.3
	NUTS321:1.2
	NUTS320:1.1;
locks; strict;
comment	@# @;


1.4
date	96.12.10.05.11.11;	author kcozens;	state Exp;
branches;
next	1.3;

1.3
date	96.12.09.07.09.14;	author kcozens;	state Release;
branches;
next	1.2;

1.2
date	96.07.23.16.33.41;	author kcozens;	state Exp;
branches;
next	1.1;

1.1
date	96.07.23.15.55.26;	author kcozens;	state Exp;
branches;
next	;


desc
@This file provides information about the embedded colour commands that may
now be used in this latest release of NUTS.
@


1.4
log
@Added a brief note about the use of underlining as a "colour" option.
@
text
@**** About colour and the embedded colour commands ****

The colour within the talker is its shipped is set up to look good on a
white text on black backgroup type of terminal/xterm eg the Linux console.
If you're using a black text on white backgroup (ie a crap xterm) then the
colour scheme may not look so good. Tough :) You'll have to change it yourself.

Colour commands can be placed in any string in the program that is used
eventually by write_user() and also in any file that is paged by the more()
function (except MOTD1 as colours can't be used here in case the users terminal
doesn't support them). The commands get translated into ANSI codes by these 2 
functions before the strings are sent out. Bear in mind that if you're on a 
black and white or green screen terminal all you'll get is various shades of 
grey/green instead of colours (if you get anything at all). All the commands 
start with a ~ and are the following:

RS - reset terminal to default colour status
RV - reverse video
OL - bold
LI - blink/flash text (only the text flashes , not the background colour). 
	This won't work on all terminals , some xterms simply set it to bold.
UL - underline text, this doesn't work on all terminals.

FK - set foreground colour to black
FR - foreground red
FG - green
FY - yellow (though it looks an orangey brown on some systems)
FB - blue
FM - magenta/purple
FT - turquoise/bright blue
FW - white

BK - set background colour to black
BR - red
BG - green
BY - yellow
BB - blue
BM - magenta
BT - turqouise
BW - white

So if for instance you wanted some flashing magenta "hello" on a green
background followed by a non-flashing blue "world" on a black background you 
would do the following:

write_user(user,"~FM~LI~BGhello ~RS~FBworld\n");

Notice the use of the reset (RS) to reset the background to black and the text
to non-flashing (assuming you're using a white text on black screen VDU). Also 
note that an automatic reset is sent whenever a \0 or \n is encountered in a 
string so the colours set to do not carry over to the next line.

Colour commands can be used within the talker as a user as well as in the code
so for instance you can embed them in anything you say or shout , in your
description , board messages , mail etc ... so to use the above example as
some mail you would enter...

.smail fred ~FM~LI~BGhello ~RS~FBworld

Please note however that the colour commands contribute to the length of
the string so for instance if you put in lots of colour in your description
you may find that it tells you that its too long even if it seems to you that
the actual text is rather short. There is a way around this but its tricky to
program and I can't be bothered to do it. Deal with it :)

You can print out colour commands as themselves by prepending them with a
forward slash '/'. For example:

write_user(user,"/~FMtest\n");

This would print out '~FMtest' to the screen minus the slash. The slash can
also be used online in the talker commands.

*** REMEMBER ***

Not everyones terminal supports ANSI colour codes. It'll either ignore
them or will produce some very strange effects. Bear this in mind if you
decide to set the user colour default to ON.

@


1.3
log
@Updated with more information on the use of colour with a few bits in colour.
@
text
@d22 1
@


1.2
log
@Minor improvements to the information provided in this file.
@
text
@d1 6
a6 1
**** About the embedded colour commands ****
d10 6
a15 5
function. The commands get translated into ANSI codes by these 2 functions 
before the strings are sent out. Bear in mind that if you're on a black and
white or green screen terminal all you'll get is various shades of grey/green
instead of colours (if you get anything at all). All the commands start with 
a ~ and are the following:
d48 3
a50 4
to non-flashing. Also note that an automatic reset is sent whenever a \0 or \n 
is encountered in a string so the colours set to do not carry over to the next 
line. Currently there is no way of printing out the commands directly to
the screen instead of them producing a colour. 
d64 14
@


1.1
log
@Initial revision
@
text
@d6 4
a9 2
before they are sent out. All the commands start with a ~ and are the
following:
d11 1
a11 1
RS - reset terminal to default
d14 2
a15 2
LI - blink/flash text (only the text flashes , not the background colour). This
	won't work on all terminals , some xterms simply set it to bold.
d20 1
a20 1
FY - yellow (though it looks orangey brown on some systems)
d45 1
a45 2
the screen instead of them producing a colour. I may put in some way of doing
this eventually if anyone ever needs it but I doubt they will.
@
