23 releases (stable)

new 2.5.0-beta.0 Dec 7, 2024
2.4.0 May 23, 2024
2.2.0 Mar 18, 2024
2.0.0-beta.3 Feb 18, 2024
1.0.4 Oct 23, 2022

#16 in Text editors

Download history 59/week @ 2024-08-23 80/week @ 2024-08-30 116/week @ 2024-09-06 80/week @ 2024-09-13 138/week @ 2024-09-20 85/week @ 2024-09-27 62/week @ 2024-10-04 110/week @ 2024-10-11 67/week @ 2024-10-18 51/week @ 2024-10-25 97/week @ 2024-11-01 55/week @ 2024-11-08 48/week @ 2024-11-15 83/week @ 2024-11-22 91/week @ 2024-11-29 143/week @ 2024-12-06

367 downloads per month
Used in 4 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.8–10MB
~121K SLoC