macro_rules! colorful_version {
() => { ... };
($name_fg:expr, $name_bg:expr, $version:expr, $author:expr) => { ... };
}Expand description
Main macro for easy creation of ColorfulVersion from Cargo.toml
IMPORTANT: This macro uses env!() which expands at the caller’s location,
so it will correctly pick up the caller’s package information, not this library’s.
§Examples
use clap_version_flag::colorful_version;
// With default colors - gets info from YOUR Cargo.toml
let version = colorful_version!();
println!("{}", version); // Prints: your-app-name v1.0.0 by Your Name
// With custom hex colors
let version = colorful_version!("#FFFFFF", "#AA00FF", "#FFFF00", "#00FFFF");