pub struct ThemeColors {Show 16 fields
pub name: &'static str,
pub scheme: ThemeColorScheme,
pub neutrals: NeutralRamp,
pub primary: Color,
pub on_primary: Color,
pub secondary: Color,
pub on_secondary: Color,
pub info: Color,
pub on_info: Color,
pub success: Color,
pub on_success: Color,
pub warning: Color,
pub on_warning: Color,
pub danger: Color,
pub on_danger: Color,
pub decorative: DecorativeColors,
}Expand description
The source colors of a theme. Everything widgets paint — control states,
soft washes, legible tone text, focus, selection, and the HDR variants —
is derived from these values, so editing any field (for example
primary) keeps every dependent role consistent.
Fields§
§name: &'static str§scheme: ThemeColorScheme§neutrals: NeutralRamp§primary: ColorBrand color: primary actions, links, checked controls, focus rings, and thin selection indicators.
on_primary: Color§secondary: ColorSecondary signal color for live and decorative emphasis.
on_secondary: Color§info: Color§on_info: Color§success: Color§on_success: Color§warning: Color§on_warning: Color§danger: Color§on_danger: Color§decorative: DecorativeColorsImplementations§
Source§impl ThemeColors
impl ThemeColors
Sourcepub fn sui() -> ThemeColors
pub fn sui() -> ThemeColors
SUI’s branded light palette. This is an explicit alias for
Self::light so applications can distinguish the SUI preset from
other built-in light themes.
Sourcepub fn light() -> ThemeColors
pub fn light() -> ThemeColors
Pure white and gray surfaces with the vibrant SUI azure accent.
Sourcepub fn dark() -> ThemeColors
pub fn dark() -> ThemeColors
Faintly blue-tinted dark surfaces with the same SUI azure accent as the light preset.
Sourcepub fn high_contrast() -> ThemeColors
pub fn high_contrast() -> ThemeColors
True-black OLED companion to Self::dark.
Sourcepub fn neutral() -> ThemeColors
pub fn neutral() -> ThemeColors
The SUI light ramp with an achromatic primary, for professional interfaces that have no product color preference. Status and decorative colors keep their meaning.
Sourcepub fn neutral_dark() -> ThemeColors
pub fn neutral_dark() -> ThemeColors
Dark companion to Self::neutral on the achromatic dark ramp.
pub fn with_scheme(scheme: ThemeColorScheme) -> ThemeColors
Trait Implementations§
Source§impl Clone for ThemeColors
impl Clone for ThemeColors
Source§fn clone(&self) -> ThemeColors
fn clone(&self) -> ThemeColors
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ThemeColors
Source§impl Debug for ThemeColors
impl Debug for ThemeColors
Source§impl Default for ThemeColors
impl Default for ThemeColors
Source§fn default() -> ThemeColors
fn default() -> ThemeColors
Source§impl PartialEq for ThemeColors
impl PartialEq for ThemeColors
impl StructuralPartialEq for ThemeColors
Auto Trait Implementations§
impl Forget for ThemeColors
impl Freeze for ThemeColors
impl Move for ThemeColors
impl RefUnwindSafe for ThemeColors
impl Send for ThemeColors
impl Sync for ThemeColors
impl Unpin for ThemeColors
impl UnsafeUnpin for ThemeColors
impl UnwindSafe for ThemeColors
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.