https://github.com/catppuccin/rust
🦀 Soothing pastel theme for Rust
https://github.com/catppuccin/rust
cargo catppuccin hacktoberfest library rust
Last synced: 6 months ago
JSON representation
🦀 Soothing pastel theme for Rust
- Host: GitHub
- URL: https://github.com/catppuccin/rust
- Owner: catppuccin
- License: mit
- Created: 2022-10-29T22:33:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-05T17:17:05.000Z (10 months ago)
- Last Synced: 2025-07-24T06:57:57.488Z (6 months ago)
- Topics: cargo, catppuccin, hacktoberfest, library, rust
- Language: Rust
- Homepage: https://crates.io/crates/catppuccin
- Size: 219 KB
- Stars: 116
- Watchers: 4
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

Catppuccin for Rust
## Usage
Add Catppuccin to your project's `Cargo.toml`:
```console
$ cargo add catppuccin
```
## Example
```rust
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](https://github.com/catppuccin/rust/tree/main/examples).
## Optional Features
### ANSI string painting
Enable the `ansi-term` feature to add the
`Color::ansi_paint` method.
This adds [ansi-term](https://crates.io/crates/ansi_term) as a dependency.
Example: [`examples/term_grid.rs`](https://github.com/catppuccin/rust/blob/main/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](https://crates.io/crates/css-colors) as a dependency.
Example: [`examples/css.rs`](https://github.com/catppuccin/rust/blob/main/examples/css.rs)
#### Ratatui
Enable the `ratatui` feature to enable the conversion of Catppuccin colors to
`ratatui::style::Color` instances.
This adds [ratatui](https://crates.io/crates/ratatui) as a dependency.
Example: [`examples/ratatui.rs`](https://github.com/catppuccin/rust/blob/main/examples/ratatui.rs)
#### Serde
Enable the `serde` feature to enable the serialization of Catppuccin's palette,
flavor, and color types.
This adds [serde](https://crates.io/crates/serde) as a dependency.
Example: [`examples/serde.rs`](https://github.com/catppuccin/rust/blob/main/examples/serde.rs)
## Contributing
This project uses [pre-commit](https://pre-commit.com/) to maintain consistent code style and standards.
See also [CONTRIBUTING.md](https://github.com/catppuccin/catppuccin/blob/main/CONTRIBUTING.md)
## 💝 Thanks to
- [backwardspy](https://github.com/backwardspy)
- [Gingeh](https://github.com/Gingeh)
- [Julius](https://github.com/juliuskreutz)
- [Nyx](https://github.com/nyxkrage)
Copyright © 2021-present Catppuccin Org