Skip to main content

Theme

Struct Theme 

Source
pub struct Theme {
    pub name: &'static str,
    pub bg: Color32,
    pub node_fill: Color32,
    pub node_stroke: Color32,
    pub edge: Color32,
    pub text: Color32,
    pub text_dim: Color32,
    pub accent: Color32,
    pub point: Color32,
    pub panel_bg: Color32,
    pub panel_stroke: Color32,
    pub glow: Color32,
}
Expand description

The facett palette. All custom-painted colours come from here.

glow is the colour the effects module blooms with (layered alpha strokes). It defaults to accent for the legacy palettes via the constructors below, but a striking theme may pick a distinct glow.

Fields§

§name: &'static str§bg: Color32§node_fill: Color32§node_stroke: Color32§edge: Color32§text: Color32§text_dim: Color32§accent: Color32§point: Color32§panel_bg: Color32§panel_stroke: Color32§glow: Color32

The colour effects blooms/shimmers with.

Implementations§

Source§

impl Theme

Source

pub const ALL: &'static [fn() -> Theme]

Every named theme, in picker order. Drives a UI/CLI palette switcher.

Source

pub fn names() -> Vec<&'static str>

The names of every theme in Theme::ALL — handy for a CLI --theme flag or a dropdown without constructing each palette.

Source

pub fn by_name(name: &str) -> Option<Theme>

Look a theme up by its name (case-insensitive; -/_/spaces are interchangeable, so "nordic aurora", "nordic-aurora", "Nordic_Aurora" all match). None if unknown.

Source

pub fn sci_fi() -> Self

Neon-on-near-black — a sci-fi HUD look (cyan/magenta on deep blue-black).

Source

pub fn nordic_aurora() -> Self

Nordic aurora — deep fjord-night blue with green/teal aurora ribbons and a cold violet accent. Calm but luminous; the glow is aurora-green.

Source

pub fn cyberpunk_neon() -> Self

Cyberpunk neon — hot magenta + electric cyan on bruised purple-black. Maximum night-city pop; the glow is magenta.

Source

pub fn amber_crt() -> Self

Amber CRT — a warm phosphor terminal: amber-on-black with a dim scan-line brown. Cosy retro; the glow is amber.

Source

pub fn deep_space() -> Self

Deep space — near-black indigo void, starlight-white text, and a nebula magenta/blue accent. Vast and quiet; the glow is nebula-violet.

Source

pub fn hugin_noir() -> Self

Hugin noir — the raven’s own palette: raven-black ground, bone-white text, a single blood-red accent. Stark and editorial; the glow is blood.

Source

pub fn visuals(&self) -> Visuals

egui Visuals matching the palette — themes the standard widgets (buttons, progress bars, grids) to fit.

Trait Implementations§

Source§

impl Clone for Theme

Source§

fn clone(&self) -> Theme

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Theme

Source§

impl Debug for Theme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Theme

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Theme

§

impl RefUnwindSafe for Theme

§

impl Send for Theme

§

impl Sync for Theme

§

impl Unpin for Theme

§

impl UnsafeUnpin for Theme

§

impl UnwindSafe for Theme

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(value: T, _simd: S) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.