pub struct MaterialColors {
Show 51 fields pub dark: bool, pub base_color: String, pub zoom: f32, pub primary: Color32, pub on_primary: Color32, pub primary_container: Color32, pub on_primary_container: Color32, pub inverse_primary: Color32, pub primary_fixed: Color32, pub primary_fixed_dim: Color32, pub on_primary_fixed: Color32, pub on_primary_fixed_variant: Color32, pub secondary: Color32, pub on_secondary: Color32, pub secondary_container: Color32, pub on_secondary_container: Color32, pub secondary_fixed: Color32, pub secondary_fixed_dim: Color32, pub on_secondary_fixed: Color32, pub on_secondary_fixed_variant: Color32, pub tertiary: Color32, pub on_tertiary: Color32, pub tertiary_container: Color32, pub on_tertiary_container: Color32, pub tertiary_fixed: Color32, pub tertiary_fixed_dim: Color32, pub on_tertiary_fixed: Color32, pub on_tertiary_fixed_variant: Color32, pub error: Color32, pub on_error: Color32, pub error_container: Color32, pub on_error_container: Color32, pub surface_dim: Color32, pub surface: Color32, pub surface_bright: Color32, pub surface_container_lowest: Color32, pub surface_container_low: Color32, pub surface_container: Color32, pub surface_container_high: Color32, pub surface_container_highest: Color32, pub on_surface: Color32, pub on_surface_variant: Color32, pub outline: Color32, pub outline_variant: Color32, pub inverse_surface: Color32, pub inverse_on_surface: Color32, pub surface_variant: Color32, pub background: Color32, pub on_background: Color32, pub shadow: Color32, pub scrim: Color32,
}

Fields§

§dark: bool§base_color: String§zoom: f32§primary: Color32§on_primary: Color32§primary_container: Color32§on_primary_container: Color32§inverse_primary: Color32§primary_fixed: Color32§primary_fixed_dim: Color32§on_primary_fixed: Color32§on_primary_fixed_variant: Color32§secondary: Color32§on_secondary: Color32§secondary_container: Color32§on_secondary_container: Color32§secondary_fixed: Color32§secondary_fixed_dim: Color32§on_secondary_fixed: Color32§on_secondary_fixed_variant: Color32§tertiary: Color32§on_tertiary: Color32§tertiary_container: Color32§on_tertiary_container: Color32§tertiary_fixed: Color32§tertiary_fixed_dim: Color32§on_tertiary_fixed: Color32§on_tertiary_fixed_variant: Color32§error: Color32§on_error: Color32§error_container: Color32§on_error_container: Color32§surface_dim: Color32§surface: Color32§surface_bright: Color32§surface_container_lowest: Color32§surface_container_low: Color32§surface_container: Color32§surface_container_high: Color32§surface_container_highest: Color32§on_surface: Color32§on_surface_variant: Color32§outline: Color32§outline_variant: Color32§inverse_surface: Color32§inverse_on_surface: Color32§surface_variant: Color32§background: Color32§on_background: Color32§shadow: Color32§scrim: Color32

Implementations§

source§

impl MaterialColors

source

pub fn rebuild(&mut self) -> Self

source

pub fn new(base_color: String, dark: bool, zoom: f32) -> Self

source

pub fn export(&self) -> Style

exports the default M3 theme this function applies M3 themes to egui assets, specific implementation is subject to change CANNOT apply zoom

source

pub fn apply_zoom(&mut self, ctx: &Context, first_run: &mut bool)

applies generated theming values to ctx this also applies zoom value: must be stored persistently

source

pub fn apply(&mut self, ctx: &Context)

applies generated theming values to ctx

source

pub fn apply_ui(&self, ui: &mut Ui)

applies generated values to Ui CANNOT apply zoom

source

pub fn error_apply(&self, ui: &mut Ui)

Trait Implementations§

source§

impl Clone for MaterialColors

source§

fn clone(&self) -> MaterialColors

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for MaterialColors

source§

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

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

impl Default for MaterialColors

source§

fn default() -> MaterialColors

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

Auto Trait Implementations§

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<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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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.
source§

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