Macro term_ansi::colour

source ·
macro_rules! colour {
    ($r:expr, $g:expr, $b:expr, $($arg:tt)*) => { ... };
}
Expand description

Applies a custom RGB color to the provided format string.

§Arguments

  • r - The red component (0-255).
  • g - The green component (0-255).
  • b - The blue component (0-255).
  • args - The format string and its arguments.

§Example

use term_ansi::*;

println!("{}", colour!(255, 0, 0, "This is {} text", "bright red"));