pub struct MaterialColorScheme {Show 35 fields
pub is_dark: bool,
pub primary: Color,
pub on_primary: Color,
pub primary_container: Color,
pub on_primary_container: Color,
pub secondary: Color,
pub on_secondary: Color,
pub secondary_container: Color,
pub on_secondary_container: Color,
pub tertiary: Color,
pub on_tertiary: Color,
pub tertiary_container: Color,
pub on_tertiary_container: Color,
pub error: Color,
pub on_error: Color,
pub error_container: Color,
pub on_error_container: Color,
pub background: Color,
pub on_background: Color,
pub surface: Color,
pub on_surface: Color,
pub surface_variant: Color,
pub on_surface_variant: Color,
pub outline: Color,
pub outline_variant: Color,
pub shadow: Color,
pub scrim: Color,
pub inverse_surface: Color,
pub inverse_on_surface: Color,
pub inverse_primary: Color,
pub surface_container: Color,
pub surface_container_high: Color,
pub surface_container_highest: Color,
pub surface_container_low: Color,
pub surface_container_lowest: Color,
}Expand description
A Material Design color scheme, which can be light or dark, produced from a seed color.
Fields§
§is_dark: boolIndicates if the scheme is dark mode (true) or light mode (false).
primary: ColorThe primary color of the scheme.
on_primary: ColorColor used for content on top of primary.
primary_container: ColorA container color for primary.
on_primary_container: ColorColor used for content on top of primary_container.
secondary: ColorThe secondary color of the scheme.
on_secondary: ColorColor used for content on top of secondary.
secondary_container: ColorA container color for secondary.
on_secondary_container: ColorColor used for content on top of secondary_container.
tertiary: ColorThe tertiary color of the scheme.
on_tertiary: ColorColor used for content on top of tertiary.
tertiary_container: ColorA container color for tertiary.
on_tertiary_container: ColorColor used for content on top of tertiary_container.
error: ColorThe error color of the scheme.
on_error: ColorColor used for content on top of error.
error_container: ColorA container color for error.
on_error_container: ColorColor used for content on top of error_container.
background: ColorThe background color of the scheme.
on_background: ColorColor used for content on top of background.
surface: ColorThe surface color of the scheme.
on_surface: ColorColor used for content on top of surface.
surface_variant: ColorA variant of the surface color.
on_surface_variant: ColorColor used for content on top of surface_variant.
outline: ColorThe outline color.
outline_variant: ColorA variant of the outline color.
shadow: ColorThe shadow color.
scrim: ColorThe scrim color.
inverse_surface: ColorAn inverse of the surface color.
inverse_on_surface: ColorColor used for content on top of inverse_surface.
inverse_primary: ColorAn inverse of the primary color.
surface_container: ColorA container color for surfaces.
surface_container_high: ColorA high container color for surfaces.
surface_container_highest: ColorA low container color for surfaces.
surface_container_low: ColorA low container color for surfaces.
surface_container_lowest: ColorA lowest container color for surfaces.
Implementations§
Source§impl MaterialColorScheme
impl MaterialColorScheme
Sourcepub fn light_from_seed(seed: Color) -> Self
pub fn light_from_seed(seed: Color) -> Self
Generates a light color scheme derived from the provided seed color.
Sourcepub fn dark_from_seed(seed: Color) -> Self
pub fn dark_from_seed(seed: Color) -> Self
Generates a dark color scheme derived from the provided seed color.
Trait Implementations§
Source§impl Clone for MaterialColorScheme
impl Clone for MaterialColorScheme
Source§fn clone(&self) -> MaterialColorScheme
fn clone(&self) -> MaterialColorScheme
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MaterialColorScheme
impl RefUnwindSafe for MaterialColorScheme
impl Send for MaterialColorScheme
impl Sync for MaterialColorScheme
impl Unpin for MaterialColorScheme
impl UnwindSafe for MaterialColorScheme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more