NAME
Term::ScreenColor - Screen positioning and coloring module for Perl
SYNOPSIS
An all perl Term::Screen based screen positioning module with ANSI color support.
use Term::ScreenColor;
$scr = new Term::ScreenColor;
$scr->at(2,0)->red()->on_yellow()->puts("Hello, Tau Ceti!");
$scr->raw();
DESCRIPTION
Term::ScreenColor adds ANSI coloring support, along with a few other useful methods, to the objects provided in Term::Screen. This provides an object class that combines the best of Term::Screen (i.e. the ability to string method calls together) with the best of Term::ANSIScreen (i.e. ANSI color support).
PUBLIC INTERFACE
In addition to the methods described in Term::Screen(3pm), Term::ScreenColor offers the following methods:
- cooked()
-
Sets cooked input mode (using stty).
- raw()
-
Sets raw input mode (using stty).
- color()
-
Turn on a color by specifying its number in the table specified below:
clear => 0 black => 30 on_black => 40 reset => 0 red => 31 on_red => 41 ansibold => 1 green => 32 on_green => 42 underline => 4 yellow => 33 on_yellow => 43 underscore => 4 blue => 34 on_blue => 44 blink => 5 magenta => 35 on_magenta => 45 inverse => 7 cyan => 36 on_cyan => 46 concealed => 8 white => 37 on_white => 47
- black() etc.
-
Turn on a color by its name.
- colorizable()
-
May be used to either set (if called with one integer argument) or query (if called with no arguments) whether the terminal is believed to support ANSI color codes. If this is set to off (0), no ANSI codes will be output. This provides an easy way for turning on/off color.
AUTHOR
Rene Uittenbogaard (ruittenb@users.sourceforge.net)
Term::ScreenColor was based on:
- Term::Screen
-
Originally by Mark Kaehny (kaehny@execpc.com), now maintained by Jonathan Stowe (jns@gellyfish.com)
- Term::ANSIColor-0.09
-
By Russ Allbery (rra@cs.stanford.edu) and Zenin (zenin@best.com)
SEE ALSO
Term::Screen(3pm), Term::Cap(3pm), termcap(5), ncurses(3), stty(1)