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() -> Self
pub fn sui() -> Self
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 dark() -> Self
pub fn dark() -> Self
Faintly blue-tinted dark surfaces with the same SUI azure accent as the light preset.
Sourcepub fn high_contrast() -> Self
pub fn high_contrast() -> Self
True-black OLED companion to Self::dark.
Sourcepub fn neutral() -> Self
pub fn neutral() -> Self
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() -> Self
pub fn neutral_dark() -> Self
Dark companion to Self::neutral on the achromatic dark ramp.