Expand description
§egui-thematic
A comprehensive theme editor and configuration system for egui applications with live preview, preset management, random theme generation, and persistence.
§Features
- Full Theme Configuration: Customize all visual aspects of your egui application
- Built-in Presets: Dark and Light themes included out of the box
- Random Theme Generation: Generate completely random themes with a single click
- Live Preview: See changes in real-time as you edit
- Persistence: Save and load themes to/from JSON files
- Interactive Theme Editor: Full-featured UI with color pickers and preview panel
§Quick Start
use egui_thematic::{ThemeConfig, ThemeEditorState, render_theme_panel};
let mut theme_editor_state = ThemeEditorState::default();
let mut show_theme_editor = true;
// In your UI code:
// render_theme_panel(ctx, &mut theme_editor_state, &mut show_theme_editor);§Examples
§Using Presets
use egui_thematic::ThemeConfig;
let dark_theme = ThemeConfig::dark_preset();
let light_theme = ThemeConfig::light_preset();§Generating Random Themes
use egui_thematic::ThemeConfig;
let random_theme = ThemeConfig::randomize();§Saving and Loading
let theme = ThemeConfig::dark_preset();
theme.save_to_file(Path::new("my_theme.theme.json"))?;
let loaded = ThemeConfig::load_from_file(Path::new("my_theme.theme.json"))?;Structs§
Functions§
- render_
theme_ editor - render_
theme_ panel - Renders the theme editor UI.