Simple ANSI color library
color_black
color_blue
color_bright_blue
color_bright_cyan
color_bright_green
color_bright_magenta
color_bright_red
color_bright_white
color_bright_yellow
color_cyan
color_dark_gray
color_dark_grey
color_green
color_light_gray
color_light_grey
color_magenta
color_red
color_yellow
bg
- Set the background colorcolor_supported
- Returns true if the terminal supports coloresc
fg
- Set the foreground colorreset
- Reset the foreground and background colors to defaultset_color
color_black
u8
color_blue
u8
color_bright_blue
u8
color_bright_cyan
u8
color_bright_green
u8
color_bright_magenta
u8
color_bright_red
u8
color_bright_white
u8
color_bright_yellow
u8
color_cyan
u8
color_dark_gray
u8
color_dark_grey
u8
color_green
u8
color_light_gray
u8
color_light_grey
u8
color_magenta
u8
color_red
u8
color_yellow
u8
bg
fn bg(writer: io::writer, color: u8)
Set the background color
color_supported
fn color_supported() -> bool
Returns true if the terminal supports color
esc
fn esc(writer: io::writer)
fg
fn fg(writer: io::writer, color: u8)
Set the foreground color
reset
fn reset(writer: io::writer)
Reset the foreground and background colors to default
set_color
fn set_color(writer: io::writer, first_char: u8, color: u8)