Simple ANSI color library
Terminal
pub struct Terminal {
num_colors: u16,
priv out: @io::Writer,
priv ti: ~TermInfo,
}
Terminal
new
fn new(out: @io::Writer) -> Result<Terminal, ~str>
fg
fn fg(&self, color: color::Color)
Sets the foreground color to the given color.
If the color is a bright color, but the terminal only supports 8 colors, the corresponding normal color will be used instead.
bg
fn bg(&self, color: color::Color)
Sets the background color to the given color.
If the color is a bright color, but the terminal only supports 8 colors, the corresponding normal color will be used instead.
reset
fn reset(&self)