1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/// Contains optional utilities like vt_mode!() and styled!()
/// # The ansi! macro
///
/// The proc macro directly returns the harcoded string result of the DSL syntax and styling you provided fully at compile time.
///
/// Syntax:
///
/// Each styling argument is passed to the ansi macro separated by a space as such:
/// ```rust
/// ansi!(red bold);
/// ```
///
/// Each styling argument (which has a color target) may also have any combination of these arguments:
/// - "br" - sets the target as a bright color
/// - "bg" - sets the color as the background color
///
/// Example with a red bright background and a bold style:
/// ```rust
/// ansi!(bg.br.red bold);
/// ```
///
/// (foreground is the default of written colors so to specify a red foreground you can just write "red")
///
/// We also Support rgb with the rgb(r, g, b) syntax like this:
/// ```rust
/// ansi!(rgb(255, 34, 55));
/// ```
///
/// Idiomatic ansic syntax is also storing styles in constants and using them to style in a much less verbose way:
/// ```rust
/// const ERROR: &str = ansi!(br.red bold underline italic);
/// const RESET: &str = ansi!(reset);
///
/// fn main() {
/// println!("{ERROR}[ERROR]: Hello, world!{RESET}");
/// }
/// ```
///
/// Rgb colors may also take bg as an argument but br won't have an effect
/// ```rust
/// ansi!(bg.rgb(255, 34, 55))
/// ```
///
/// ## All styles (doesnt support any arguments):
/// - reset
/// - bold
/// - dim
/// - italic
/// - underline
/// - blink
/// - rapidblink (mostly deprecated)
/// - invert
/// - hidden
/// - strikethrough (has alias: st)
///
/// ## All colors (supports br and bg arguments):
/// - black
/// - red
/// - green
/// - yellow
/// - blue
/// - magenta
/// - cyan
/// - white
///
/// Rgb color 24 bits (supports bg argument):
/// - rgb(r, g, b)
pub use ansi;