catppuccin-palette/rust/examples/term.rs
2022-10-23 16:48:40 +01:00

20 lines
574 B
Rust

use catppuccin::flavours_iter;
fn main() {
// iterate over the four Catppuccin flavours.
for flavour in flavours_iter() {
println!("{}", flavour.name);
// iterate over the 26 colours in the flavour.
for (i, colour) in flavour.iter().enumerate() {
print!("{}", colour.ansi_paint("██"));
// the 14 analogous colours go on one line,
// then we break for the 12 monochromatic colours.
if i > 0 && i % 13 == 0 {
println!();
}
}
println!();
}
}