1use tinterm::*;
2
3fn main() {
4 println!("🎨 ASCII Art & Logos with Tinterm 🎨\n");
5
6 display_tinterm_logo();
8 println!();
9
10 display_rainbow_text();
12 println!();
13
14 display_progress_bars();
16 println!();
17
18 display_status_indicators();
20 println!();
21
22 display_boxes();
24 println!();
25
26 display_fire_effect();
28 println!();
29
30 display_matrix_effect();
32}
33
34fn display_tinterm_logo() {
35 println!("Tinterm Logo:");
36 let logo = r#"
37 ████████ ██ ███ ██ ████████ ███████ ████████ ███ ███
38 ██ ██ ████ ██ ██ ██ ██ ████ ████
39 ██ ██ ██ ██ ██ ██ █████ ██ ██ ████ ██
40 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
41 ██ ██ ██ ████ ██ ███████ ██ ██ ██
42"#;
43
44 println!("{}", logo.gradient(Color::CYAN, Color::MAGENTA, Some(true)));
46
47 println!(
49 " {}\n",
50 "✨ Tinted Terminal Colors ✨"
51 .shimmer(Color::GOLD, None)
52 .static_render()
53 );
54}
55
56fn display_rainbow_text() {
57 println!("Rainbow Effects:");
58
59 let text = "RAINBOW";
61 let colors = vec![
62 Color::RED,
63 Color::ORANGE,
64 Color::YELLOW,
65 Color::GREEN,
66 Color::BLUE,
67 Color::INDIGO,
68 Color::VIOLET,
69 ];
70
71 let mut rainbow = String::new();
72 for (i, ch) in text.chars().enumerate() {
73 rainbow.push_str(&ch.to_string().color(colors[i % colors.len()]));
74 }
75 println!(" Letter Rainbow: {}", rainbow);
76
77 println!(
79 " Gradient Rainbow: {}",
80 "🌈 RAINBOW GRADIENT 🌈".gradient(Color::RED, Color::VIOLET, None)
81 );
82
83 println!(
85 " Shimmer Rainbow: {}",
86 "✨ SHIMMERING RAINBOW ✨"
87 .shimmer_gradient(Color::RED, Color::VIOLET, None)
88 .static_render()
89 );
90}
91
92fn display_progress_bars() {
93 println!("Progress Bars:");
94
95 let progress_levels = vec![
96 ("Download", 25, Color::BLUE),
97 ("Install", 75, Color::GREEN),
98 ("Configure", 100, Color::CYAN),
99 ("Error", 33, Color::RED),
100 ];
101
102 for (task, progress, color) in progress_levels {
103 let filled = progress / 5;
104 let empty = 20 - filled;
105
106 let bar_filled = "█".repeat(filled).color(color);
107 let bar_empty = "░".repeat(empty).color(Color::DARK_GRAY);
108
109 println!(
110 " {:<12} [{}{}] {}%",
111 task.color(Color::WHITE),
112 bar_filled,
113 bar_empty,
114 progress.to_string().color(color)
115 );
116 }
117}
118
119fn display_status_indicators() {
120 println!("\nStatus Indicators:");
121
122 let statuses = vec![
123 ("System Online", "●", Color::GREEN),
124 ("Database Connected", "●", Color::GREEN),
125 ("Cache Warning", "●", Color::YELLOW),
126 ("API Timeout", "●", Color::RED),
127 ("Maintenance Mode", "●", Color::ORANGE),
128 ("Backup Running", "◐", Color::BLUE),
129 ];
130
131 for (status, icon, color) in statuses {
132 println!(" {} {}", icon.color(color), status.color(Color::WHITE));
133 }
134
135 println!(
137 " {} {}",
138 "●".color(Color::RED),
139 "CRITICAL ALERT".color(Color::RED).bold()
140 );
141}
142
143fn display_boxes() {
144 println!("\nDecorative Boxes:");
145
146 let _box_chars = "┌─┐│└─┘";
148 println!(" {}", "┌─────────────────┐".color(Color::CYAN));
149 println!(
150 " {} {} {}",
151 "│".color(Color::CYAN),
152 " Simple Box ".color(Color::WHITE),
153 "│".color(Color::CYAN)
154 );
155 println!(" {}", "└─────────────────┘".color(Color::CYAN));
156
157 println!(
159 "\n {}",
160 "╔═════════════════╗".gradient(Color::BLUE, Color::PURPLE, None)
161 );
162 println!(
163 " {} {} {}",
164 "║".color(Color::PURPLE),
165 " Gradient Box ".color(Color::WHITE),
166 "║".color(Color::PURPLE)
167 );
168 println!(
169 " {}",
170 "╚═════════════════╝".gradient(Color::PURPLE, Color::BLUE, None)
171 );
172
173 let shimmer_box = "╭─────────────────╮".shimmer(Color::GOLD, None);
175 println!("\n {}", shimmer_box.static_render());
176 println!(
177 " {} {} {}",
178 "│".color(Color::GOLD),
179 " Shimmer Box ".color(Color::WHITE),
180 "│".color(Color::GOLD)
181 );
182 println!(
183 " {}",
184 "╰─────────────────╯"
185 .shimmer(Color::GOLD, None)
186 .static_render()
187 );
188}
189
190fn display_fire_effect() {
191 println!("\nFire Effect:");
192
193 let flames = vec![
194 " ░░░",
195 " ░░▒▒░",
196 " ░▒▒▓▓▒░",
197 " ░▒▓▓██▓▒░",
198 " ░▒▓██████▓▒░",
199 " ░▒▓████████▓▒░",
200 " ░▒▓▓██████████▓▒░",
201 " ░▒▓▓████████████▓▓▒░",
202 " ░▒▓▓██████████████▓▓▒░",
203 " ░▒▓▓████████████████▓▓▒░░",
204 ];
205
206 for (i, flame) in flames.iter().enumerate() {
207 let intensity = (flames.len() - i) as f32 / flames.len() as f32;
208 let red_component = (255.0 * intensity) as u8;
209 let yellow_component = (255.0 * intensity * 0.8) as u8;
210
211 let fire_color = Color::new(red_component, yellow_component, 0);
212 println!(" {}", flame.color(fire_color));
213 }
214}
215
216fn display_matrix_effect() {
217 println!("\nMatrix Effect:");
218
219 let _matrix_chars = "01010011 01101001 01110010";
220 let lines = vec![
221 "01001000 01100101 01101100 01101100 01101111",
222 "01010111 01101111 01110010 01101100 01100100",
223 "01010100 01101001 01101110 01110100 01100101",
224 "01110010 01101101 00100000 01001101 01100001",
225 "01110100 01110010 01101001 01111000 00100001",
226 ];
227
228 for line in lines {
229 println!(" {}", line.color(Color::GREEN));
230 }
231
232 println!(
234 "\n {}",
235 "Wake up, Neo...".glow(Color::GREEN, 200).static_render()
236 );
237 println!(" {}", "The Matrix has you...".color(Color::GREEN).bold());
238 println!(
239 " {}",
240 "Follow the white rabbit."
241 .shimmer(Color::WHITE, Some(Color::BLACK))
242 .static_render()
243 );
244
245 println!(
246 "\n{}",
247 "🎭 Art showcase complete! 🎭".gradient(Color::PURPLE, Color::CYAN, None)
248 );
249}