aboutsummaryrefslogtreecommitdiff
path: root/vendor/owo-colors/examples/banner.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-01-08 00:21:28 +0300
committerValentin Popov <valentin@popov.link>2024-01-08 00:21:28 +0300
commit1b6a04ca5504955c571d1c97504fb45ea0befee4 (patch)
tree7579f518b23313e8a9748a88ab6173d5e030b227 /vendor/owo-colors/examples/banner.rs
parent5ecd8cf2cba827454317368b68571df0d13d7842 (diff)
downloadfparkan-1b6a04ca5504955c571d1c97504fb45ea0befee4.tar.xz
fparkan-1b6a04ca5504955c571d1c97504fb45ea0befee4.zip
Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
Diffstat (limited to 'vendor/owo-colors/examples/banner.rs')
-rw-r--r--vendor/owo-colors/examples/banner.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/owo-colors/examples/banner.rs b/vendor/owo-colors/examples/banner.rs
new file mode 100644
index 0000000..28f68fc
--- /dev/null
+++ b/vendor/owo-colors/examples/banner.rs
@@ -0,0 +1,36 @@
+use owo_colors::{DynColors, OwoColorize};
+
+const OWO: &str = r#"
+ ██████╗ ██╗ ██╗ ██████╗
+ ██╔═══██╗██║ ██║██╔═══██╗
+ ██║ ██║██║ █╗ ██║██║ ██║
+ ██║ ██║██║███╗██║██║ ██║
+ ╚██████╔╝╚███╔███╔╝╚██████╔╝
+ ╚═════╝ ╚══╝╚══╝ ╚═════╝
+
+"#;
+
+const COLORS: &str = r#"
+ .o88b. | .d88b. |db | .d88b. |d8888b. |.d8888.
+ d8P Y8 |.8P Y8. |88 |.8P Y8. |88 `8D |88' YP
+ 8P |88 88 |88 |88 88 |88oobY' |`8bo.
+ 8b |88 88 |88 |88 88 |88`8b | `Y8b.
+ Y8b d8 |`8b d8' |88booo. |`8b d8' |88 `88. |db 8D
+ `Y88P' | `Y88P' |Y88888P | `Y88P' |88 YD |`8888Y' "#;
+
+fn main() {
+ let colors: [DynColors; 6] = [
+ "#B80A41", "#4E4BA8", "#6EB122", "#DAAC06", "#00938A", "#E23838",
+ ]
+ .map(|color| color.parse().unwrap());
+
+ println!("\n\n\n\n\n{}", OWO.fg_rgb::<0x2E, 0x31, 0x92>().bold());
+
+ for line in COLORS.split_inclusive('\n') {
+ for (text, color) in line.split('|').zip(colors.iter().copied()) {
+ print!("{}", text.color(color).bold());
+ }
+ }
+
+ println!("\n\n\n\n\n\n");
+}