catppuccin-palette/rust/examples/term.rs
Carsten Kragelund b27829caea Rust: Rename Palette to FlavourColours
Plus run `rustfmt`

Closes #26
2022-10-26 22:11:30 +01:00

20 lines
590 B
Rust

use catppuccin::Flavour;
fn main() {
// iterate over the four Catppuccin flavours.
for flavour in Flavour::into_iter() {
println!("{}", flavour.name());
// iterate over the 26 colours in the flavour.
for (i, colour) in flavour.colours().into_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!();
}
}