3 releases
0.1.2 | Mar 11, 2021 |
---|---|
0.1.1 | Mar 11, 2021 |
0.1.0 | Mar 11, 2021 |
#32 in #colored
381 downloads per month
Used in terminal-log-symbols
9KB
138 lines
ansi-colors-macro
A proc-macro for creating colored ANSI strings at compile-time.
Usage
use ansi_colors_macro::ansi_string;
const DONE_MSG: &str = ansi_string!("{green Done}");
Shortcomings
- Supports foreground colors only. The syntax has to be expanded for background colors and styling as well. PRs welcome. Please open an issue so we can exchange ideas beforehand!
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.