Color Echo by Jason Hood <[email]jadoxa@yahoo.com.au[/email]>.
Version 0.90 (12 July, 2004). Public Domain.
http://misc.adoxa.cjb.net/
Display text using any color you like.
Usage: cecho text
cecho --map[b|B|x]
cecho --<attr>
"text" is output as-is, with the exception of '#' sequences:
fb foreground color and optional background color:
n black N dark gray : current color
r red R bright red
g green G bright green
b blue B bright blue
c cyan C bright cyan
m magenta M bright magenta
y brown Y yellow
w gray W white
~ restore original color
= keep current color on exit
; don't end with new line
# # , tab
a & _ new line
o | d ding
s < h backspace
l > [ escape
xhh character represented by one- or two-digit hexadecimal number
ddc repeat 'c' (which may be a '#' sequence) dd times, which may be
a one- or two-digit decimal number
- stop '#' processing
+ start '#' processing (only if stopped)
. really stop '#' processing (quote remaining text)
Any character following '#' not present in the above list will be output
untranslated (along with the '#').
--map will display all the foreground colors with normal background colors;
b will use the bright background colors; and B will display both (assumes 80
columns). --mapx will display the extended ASCII characters.
--<attr> will set the color to <attr>, a decimal number between 0 and 255.
The current attribute is returned when displaying "text".
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |