
Catppuccin for Rust
Add Catppuccin to your project's Cargo.toml:
$ cargo add catppuccinuse catppuccin::Flavour;
struct Button {
text: String,
background_colour: String,
};
fn confirm(text: String) -> Button {
Button {
text,
background_colour: Flavour::Mocha.green().hex(),
}
}More examples can be found here.
Clone the repository to run them locally:
$ cargo run --example simple$ cargo run --features ansi --example termEnable the ansi feature to add the
Colour::ansi_paint method.
This adds ansi-term as a dependency.
Enable the css feature to allow the conversion of Catppuccin colours to
css_colors::RGB.
This adds css-colors as a dependency.
Copyright © 2021-present Catppuccin Org


