Re: Package Proposal: Console_Colors
| From: | Alan Knowles | Date: | Tue, 22 Apr 2003 01:11:28 +0000 |
| Subject: | Re: Package Proposal: Console_Colors | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15301@lists.php.net to get a copy of this message | ||
One little comment - choose to ignore or not :) +1 either way..
for the fixed colcode/stylecode etc. arrays try just using
$GLOBALS['_CONSOLE_COLOR']['colcode']
and
global $_CONSOLE_COLOR;
until PHP has real static's (PHP5) - thats the best we've got really. -
Regards
Alan
Stefan Walk wrote:
Hi! I'd like to propose a new package for the Console category, Console_Colors. It allows to use ANSI colors easily for commandline applications. It uses a similar transition table to the irssi one - you put a code like %ythis%n into the text and `this' would be yellow (%y = yellow, %n = reset). The complete conversion table is:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comtext text background---------------------------------------------------------------------%k %K %0 black dark grey black %r %R %1 red bold red red %g %G %2 green bold green green %y %Y %3 yellow bold yellow yellow %b %B %4 blue bold blue blue %m %M %5 magenta bold magenta magenta %p %P magenta (think: purple) %c %C %6 cyan bold cyan cyan %w %W %7 white bold white white %n Changes the color to "default color", removing all other coloring and formatting. %F Blinking on/off (think: flash) %U Underline on/off %8 Reverse on/off %9 %_ Bold on/off %% A single %Sourcecode is at: http://fuer-et.de/source/show_source.php?Console_Color.php Auto-generated Documentation is at: http://fuer-et.de/doc/Console/Color/ Regards, Stefan Walk