catppuccin-palette/rust
Carsten Kragelund 920589ac15
Rust: Test to verify existence of colour methods
We only need to test one flavour, as we just need to make sure the
methods exists because if the correct method exists it is guaurenteed to
access to correctly named field
2022-10-27 00:24:59 +02:00
..
assets docs: add webp rust example assets 2022-10-23 23:36:37 +01:00
examples Rust: Rename Palette to FlavourColours 2022-10-26 22:11:30 +01:00
src Rust: Test to verify existence of colour methods 2022-10-27 00:24:59 +02:00
.gitignore feat: add rust crate 2022-10-23 16:48:40 +01:00
Cargo.lock fix: broken repo link in rust crate 2022-10-23 23:36:20 +01:00
Cargo.toml fix: broken repo link in rust crate 2022-10-23 23:36:20 +01:00
LICENSE feat: add rust crate 2022-10-23 16:48:40 +01:00
README.md fix: broken repo link in rust crate 2022-10-23 23:36:20 +01:00

catppuccin

🦀 Soothing pastel theme for Rust.

Usage

Add Catppuccin to your project's Cargo.toml:

[dependencies]
catppuccin = "1.0.4"

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