Skip to main content

format_fg_color

Macro format_fg_color 

Source
macro_rules! format_fg_color {
    ($red:literal,$green:literal,$blue:literal) => { ... };
}
Expand description

Creates a ANSI Terminal Foreground Color Code using the specified RGB values

use irox_tools::format_fg_color;
pub const VARBL : &str = format_fg_color!(0x10,0x10,0x10);

assert_eq!("\u{1B}[38;2;16;16;16m", VARBL);