1 unstable release

Uses new Rust 2024

0.1.0 Mar 10, 2025

#386 in GUI

Download history 83/week @ 2025-03-05 33/week @ 2025-03-12

116 downloads per month

MIT license

695KB
138 lines

egui_solarized

Description

This crate is a port of solarized theme to egui

The crate provides a Theme. The theme exists in dark and light. These themes contains the colors defined by the Solarized theme and can be converted into egui Visuals. Note that some colors of the theme are not used in egui but are still available in the library if you need them (can be useful if you do a text editor)

You can use them with egui by calling ctx.set_visuals(Theme::solarized_dark().into()) or ctx.set_visuals(Theme::solarized_light().into())

Usage

Add the following to your Cargo.toml:

[dependencies]
egui_solarized = "0.1.0"

Then add the following to your main.rs:

use egui_solarized::solarized;

fn main() {
    eframe::run_native(
        "egui demo app",
        options,
        Box::new(|ctx| {
            /// Install egui's default image loaders to open image files from the file system.
            ctx.egui_ctx.set_visuals(Theme::solarized_dark().into());
            Ok(Box::new(DemoApp::default()))
        }),
    )
}

Showcase

You can find a demo in the examples/demo folder. Basically, I "stole" the widget gallery of the egui crate to demonstrate solarized theme on it

Dark Mode

Dark Mode

Light Mode

Light Mode

Dependencies

~4.5–9.5MB
~90K SLoC