20 stable releases

2.5.1 Feb 23, 2025
2.5.0-beta.0 Dec 7, 2024
2.4.0 May 23, 2024
2.2.0 Mar 18, 2024
1.0.4 Oct 23, 2022

#18 in Text editors

Download history 271/week @ 2024-12-07 152/week @ 2024-12-14 79/week @ 2024-12-21 290/week @ 2024-12-28 380/week @ 2025-01-04 271/week @ 2025-01-11 236/week @ 2025-01-18 333/week @ 2025-01-25 339/week @ 2025-02-01 387/week @ 2025-02-08 393/week @ 2025-02-15 441/week @ 2025-02-22 345/week @ 2025-03-01 469/week @ 2025-03-08 320/week @ 2025-03-15 245/week @ 2025-03-22

1,404 downloads per month
Used in 5 crates

MIT license

165KB
1K SLoC

Logo
Catppuccin for Rust

Usage

Add Catppuccin to your project's Cargo.toml:

$ cargo add catppuccin

Example

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

fn confirm(text: String) -> Button {
    Button {
        text,
        background_color: catppuccin::PALETTE.mocha.colors.green.hex.to_string(),
    }
}

More examples can be found here.

Optional Features

ANSI string painting

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

Example: examples/term_grid.rs

CSS colors

Enable the css-colors feature to enable the conversion of Catppuccin colors to css_colors::RGB instances. This adds css-colors as a dependency.

Example: examples/css.rs

Ratatui

Enable the ratatui feature to enable the conversion of Catppuccin colors to ratatui::style::Color instances. This adds ratatui as a dependency.

Example: examples/ratatui.rs

Serde

Enable the serde feature to enable the serialization of Catppuccin's palette, flavor, and color types. This adds serde as a dependency.

Example: examples/serde.rs

Contributing

This project uses pre-commit to maintain consistent code style and standards.

See also CONTRIBUTING.md

💝 Thanks to

 

Copyright © 2021-present Catppuccin Org

Dependencies

~0.9–12MB
~139K SLoC