2026-01-04 19:58:42 +00:00
2025-10-13 18:17:35 +01:00
2026-01-04 19:58:42 +00:00
2022-10-29 23:47:09 +01:00
2026-01-04 19:58:42 +00:00
2025-10-13 20:03:30 +01:00
2025-10-13 20:03:30 +01:00
2022-10-23 16:48:40 +01:00
2025-10-13 18:17:35 +01:00
2024-05-23 17:44:55 +01:00

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

Bevy

Enable the bevy feature to enable the conversion of Catppuccin colors to [bevy::prelude::Color] instances. This adds bevy as a dependency.

Example: examples/bevy.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

Iced

Enable the iced feature to enable the conversion of Catppuccin colors to [iced::Color] instances. This adds iced as a dependency.

Example: examples/iced.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

Description
No description provided
Readme MIT 426 KiB
Languages
Rust 100%