Expand description
Soothing pastel theme for egui.
To use, call set_theme
with the egui context
and a Theme
.
§Example
struct App;
impl eframe::App for App {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
catppuccin_egui::set_theme(ctx, catppuccin_egui::MACCHIATO);
egui::CentralPanel::default().show(&ctx, |ui| {
ui.label("Hello, world!");
});
}
}
You can also customize your own theme:
use catppuccin_egui::{Theme, MOCHA};
const MY_MOCHA: Theme = Theme {
red: egui::Color32::from_rgb(255, 0, 0),
..MOCHA
};
Structs§
- Theme
- The colors for a theme variant.
Constants§
Functions§
- set_
style_ theme - Apply the given theme to a
Style
. - set_
theme - Apply the given theme to a
Context
.