catppuccin-palette/rust
2022-10-23 22:21:35 +01:00
..
assets docs: use crate version in doc comment, add example outputs 2022-10-23 20:09:58 +01:00
examples feat: add rust crate 2022-10-23 16:48:40 +01:00
src docs: use crate version in doc comment, add example outputs 2022-10-23 20:09:58 +01:00
.gitignore feat: add rust crate 2022-10-23 16:48:40 +01:00
Cargo.lock chore: bump crate version number 2022-10-23 22:21:35 +01:00
Cargo.toml chore: bump crate version number 2022-10-23 22:21:35 +01:00
LICENSE feat: add rust crate 2022-10-23 16:48:40 +01:00
README.md chore: bump crate version number 2022-10-23 22:21:35 +01:00

catppuccin

🦀 Soothing pastel theme for Rust.

Usage

Add Catppuccin to your project's Cargo.toml:

[dependencies]
catppuccin = "1.0.3"

Example

use catppuccin::MOCHA;

struct Button {
    text: String,
    background_colour: String,
};

fn confirm(text: String) -> Button {
    Button {
        text,
        background_colour: MOCHA.green.hex(),
    }
}

More examples can be found here.

Clone the repository to run them locally:

$ cargo run --example simple

Output from simple example

$ cargo run --features ansi --example term

Output from term example

Optional Features

ANSI string painting

Enable the ansi feature to add the Colour::ansi_paint method. This adds ansi-term as a dependency.

License: MIT