added support for colouring th background instead of the foreground

This commit is contained in:
2023-02-09 14:01:45 +01:00
parent c138c047ed
commit f4d7e60a07
3 changed files with 45 additions and 8 deletions

View File

@@ -14,12 +14,6 @@ mod ascii_manipulation;
mod output;
mod model_rgb_ascii;
//todo:
/* custom background color, print font in white
* --formats flag
* --version flag
*/
/// This is the main function.
///
/// It drives the CLI module, calls the appropriate convert functions and directs output.
@@ -51,6 +45,10 @@ fn main() {
if let Some(output) = cli.output {
print_file(out, output);
} else {
print_terminal(out, cli.colour, cli.grayscale);
if cli.background && (cli.colour || cli.grayscale) {
print_terminal_background(out, cli.colour, cli.grayscale);
} else {
print_terminal(out, cli.colour, cli.grayscale);
}
}
}