catppuccin

Crates.iocatppuccin
lib.rscatppuccin
version2.2.0
sourcesrc
created_at2022-10-22 14:18:48.807804
updated_at2024-03-18 22:49:55.596293
description🦀 Soothing pastel theme for Rust.
homepagehttps://github.com/catppuccin/rust
repositoryhttps://github.com/catppuccin/rust
max_upload_size
id694446
size201,232
staff (github:catppuccin:staff)

documentation

https://docs.rs/catppuccin

README

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

Commit count: 37

cargo fmt