Skip to content

Commit 5cc01b9

Browse files
Demo custom color
1 parent c5c7cda commit 5cc01b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
pub use colored::*;
1+
use colored::*;
22

33
fn main() {
4-
println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}",
4+
println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}",
55
"Red".fg(red()),
66
"Orange".fg(orange()),
77
"Yellow".fg(yellow()),
@@ -13,6 +13,7 @@ fn main() {
1313
"Blue".fg(white()).bg(blue()),
1414
"Blue magenta".fg(white()).bg(blue_magenta()),
1515
"Magenta".fg(magenta()),
16-
"Magenta pink".fg(magenta_pink())
16+
"Magenta pink".fg(magenta_pink()),
17+
"Custom color".fg(Rgb::new(123, 231, 111)).bg(Rgb::new(10, 100, 20))
1718
);
1819
}

0 commit comments

Comments
 (0)