Expand description
§Chromata
1000+ editor color themes as compile-time Rust constants.
Chromata provides every popular editor and terminal color theme as
compile-time const data. No file parsing, no runtime allocation,
no dependencies. Add chromata to your Cargo.toml, write
chromata::popular::gruvbox::DARK_HARD.bg, and get a hex color
at zero cost.
§Feature Flags
| Feature | Themes | Description |
|---|---|---|
popular (default) | 49 | Curated best themes (gruvbox, catppuccin, nord…) |
base16 | 305 | Base16 themes from tinted-theming/schemes |
base24 | 184 | Base24 themes from tinted-theming/schemes |
vim | 464 | Vim colorschemes from vim-colorschemes repos |
emacs | 102 | Emacs themes from emacs-themes-site |
all | 1104 | All collections combined |
ratatui-integration | — | From<Color> for ratatui types |
egui-integration | — | From<Color> for egui types |
crossterm-integration | — | From<Color> for crossterm types |
iced-integration | — | From<Color> for iced types |
serde-support | — | Serialize/deserialize themes |
§Quick Start
use chromata::popular::gruvbox;
let theme = gruvbox::DARK_HARD;
println!("Background: {}", theme.bg.to_css_hex());
println!("Is dark? {}", theme.is_dark());§Query APIs
use chromata::{find_by_name, filter_by_variant, Variant};
if let Some(theme) = find_by_name("Gruvbox Dark Hard") {
println!("{}: {}", theme.name, theme.bg);
}
let dark_themes = filter_by_variant(Variant::Dark);Modules§
- popular
- Curated collection of the most popular editor themes.
- prelude
- Convenience re-exports for common chromata types.
Structs§
- Base16
Palette - The 16 base16 palette slots.
- Base24
Palette - Extended base24 theme with additional accent slots.
- Color
- A color represented as RGB components. All values are compile-time constants with zero runtime cost.
- Theme
- A complete editor/terminal color theme.
Enums§
- Contrast
- Contrast level classification based on WCAG contrast ratio.
- Variant
- Dark or light theme variant.
Traits§
- Into
Framework Color - Trait for converting a Chromata
Colorto a framework-specific color type. - Into
Framework Theme - Trait for converting an entire Chromata
Themeinto a framework theme.
Functions§
- collect_
all_ themes - Collect all themes from enabled feature modules into a Vec.
- filter_
by_ contrast - Filter all themes by contrast level.
- filter_
by_ variant - Filter all themes by variant (Dark or Light).
- find_
by_ name - Find a theme by exact name (case-sensitive).