LukasKalbertodt / bunt

Simple macros to write colored and formatted text to a terminal. Based on `termcolor`, thus also cross-platform.
Apache License 2.0
224 stars 7 forks source link

Pass style as argument to be able to calculate it at runtime #21

Open LukasKalbertodt opened 3 years ago

LukasKalbertodt commented 3 years ago

From https://github.com/LukasKalbertodt/bunt/issues/1#issuecomment-812863115:

Could the color and other styles be specified by argument? For example,

bunt::println!("{$*}error:{/$}", Color::Red, ty);

In that case I could calculate the color at runtime.