Simple ANSI color library

Struct Terminal

pub struct Terminal {
    num_colors: u16,
    priv out: @io::Writer,
    priv ti: ~TermInfo,
}

Implementation for Terminal

Method new

fn new(out: @io::Writer) -> Result<Terminal, ~str>

Method 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.

Method 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.

Method reset

fn reset(&self)