Crate colour

source ·
Expand description

Macros for creating coloured console output.

The macros are based on the following colours:

  • grey
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • black
  • white

There are dark versions of each colour except black and white, and for all colours there is a version with suffix _ln which appends a newline (similar to print! and println!).

There are also prnt! and prnt_ln! available which print using the current default foreground colour.

Every variant also has a version with prefix e_. Variants with this prefix output to stderr, while those without the e_ prefix output to stdout.

Macros