1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
//! # ratatui-themes
//!
//! A collection of popular color themes for [ratatui](https://ratatui.rs) terminal UI applications.
//!
//! This crate provides a consistent, easy-to-use API for applying beautiful color schemes
//! to your terminal user interfaces. Each theme includes semantic colors for common UI
//! elements like errors, warnings, and highlights.
//!
//! ## Features
//!
//! - **15+ popular themes** — Dracula, Nord, Catppuccin, Gruvbox, Tokyo Night, and more
//! - **Semantic colors** — Consistent `error`, `warning`, `success`, `info` across all themes
//! - **Easy theme cycling** — Built-in `next()`/`prev()` methods for theme switchers
//! - **Light/dark detection** — Programmatically determine if a theme is light or dark
//! - **Serde support** — Optional serialization for saving theme preferences (enabled by default)
//!
//! ## Quick Start
//!
//! ```rust
//! use ratatui_themes::{Theme, ThemeName};
//! use ratatui::style::Style;
//!
//! // Create a theme
//! let theme = Theme::new(ThemeName::Dracula);
//!
//! // Access the color palette
//! let palette = theme.palette();
//!
//! // Apply colors to styles
//! let title_style = Style::default()
//! .fg(palette.accent)
//! .bg(palette.bg);
//!
//! let error_style = Style::default().fg(palette.error);
//! let muted_text = Style::default().fg(palette.muted);
//! ```
//!
//! ## Theme Cycling
//!
//! Easily implement theme switching in your application:
//!
//! ```rust
//! use ratatui_themes::ThemeName;
//!
//! let mut current = ThemeName::Dracula;
//!
//! // Cycle forward through all themes
//! current = current.next(); // -> OneDarkPro
//!
//! // Cycle backward
//! current = current.prev(); // -> Dracula
//!
//! // Get all available themes for a selection menu
//! let all_themes = ThemeName::all();
//! ```
//!
//! ## Configuration with Serde
//!
//! Save and load theme preferences (requires the `serde` feature, enabled by default):
//!
//! ```rust
//! use ratatui_themes::ThemeName;
//! use serde::{Deserialize, Serialize};
//!
//! #[derive(Serialize, Deserialize)]
//! struct AppConfig {
//! theme: ThemeName,
//! // ... other settings
//! }
//!
//! // Theme names serialize as kebab-case strings:
//! // { "theme": "tokyo-night" }
//! ```
//!
//! ## Available Themes
//!
//! | Theme | Type | Description |
//! |-------|------|-------------|
//! | Dracula | Dark | Iconic dark purple aesthetic |
//! | One Dark Pro | Dark | Atom's beloved dark theme |
//! | Nord | Dark | Arctic, bluish color palette |
//! | Catppuccin Mocha | Dark | Warm, soothing pastel dark |
//! | Catppuccin Latte | Light | Warm pastel light variant |
//! | Gruvbox Dark | Dark | Retro groove colors |
//! | Gruvbox Light | Light | Retro groove, light mode |
//! | Tokyo Night | Dark | Futuristic Tokyo cityscape |
//! | Solarized Dark | Dark | Precision-engineered colors |
//! | Solarized Light | Light | Solarized for bright rooms |
//! | Monokai Pro | Dark | Classic syntax colors |
//! | Rosé Pine | Dark | Natural, muted elegance |
//! | Kanagawa | Dark | Inspired by Hokusai's art |
//! | Everforest | Dark | Comfortable forest green |
//! | Cyberpunk | Dark | Neon-soaked futuristic |
//!
//! ## Feature Flags
//!
//! - **`serde`** (enabled by default) — Enables serialization/deserialization of theme names
//! - **`widgets`** — Provides ready-to-use widgets like [`ThemePicker`]
//!
//! To disable serde support:
//!
//! ```toml
//! [dependencies]
//! ratatui-themes = { version = "0.1", default-features = false }
//! ```
pub use ThemePalette;
pub use ;
/// Re-export ratatui's [`Color`] type for convenience.
///
/// This allows you to use `ratatui_themes::Color` without adding ratatui
/// as a direct dependency just for the `Color` type.
pub use Color;
/// Re-export ratatui's [`Style`] type for convenience.
///
/// This allows you to use `ratatui_themes::Style` without additional imports.
pub use Style;
/// Enable included widgets.
pub use ThemePicker;