pub struct ColorSettings { /* private fields */ }Expand description
Color settings for a theme.
All fields are optional. Only specified colors will be installed. Use the builder pattern to set individual colors.
§Example
ⓘ
use waterui::theme::ColorSettings;
use waterui::color::Color;
let colors = ColorSettings::new()
.accent(my_accent_color)
.foreground(my_text_color);Implementations§
Source§impl ColorSettings
impl ColorSettings
Sourcepub fn background(self, color: impl IntoSignal<ResolvedColor>) -> Self
pub fn background(self, color: impl IntoSignal<ResolvedColor>) -> Self
Sets the background color.
Sourcepub fn surface(self, color: impl IntoSignal<ResolvedColor>) -> Self
pub fn surface(self, color: impl IntoSignal<ResolvedColor>) -> Self
Sets the surface color (cards, sheets).
Sourcepub fn surface_variant(self, color: impl IntoSignal<ResolvedColor>) -> Self
pub fn surface_variant(self, color: impl IntoSignal<ResolvedColor>) -> Self
Sets the surface variant color.
Sourcepub fn border(self, color: impl IntoSignal<ResolvedColor>) -> Self
pub fn border(self, color: impl IntoSignal<ResolvedColor>) -> Self
Sets the border color.
Sourcepub fn foreground(self, color: impl IntoSignal<ResolvedColor>) -> Self
pub fn foreground(self, color: impl IntoSignal<ResolvedColor>) -> Self
Sets the foreground color (text, icons).
Sourcepub fn muted_foreground(self, color: impl IntoSignal<ResolvedColor>) -> Self
pub fn muted_foreground(self, color: impl IntoSignal<ResolvedColor>) -> Self
Sets the muted foreground color (secondary text).
Sourcepub fn accent(self, color: impl IntoSignal<ResolvedColor>) -> Self
pub fn accent(self, color: impl IntoSignal<ResolvedColor>) -> Self
Sets the accent color (interactive elements).
Sourcepub fn accent_foreground(self, color: impl IntoSignal<ResolvedColor>) -> Self
pub fn accent_foreground(self, color: impl IntoSignal<ResolvedColor>) -> Self
Sets the accent foreground color (text on accent).
Trait Implementations§
Source§impl Debug for ColorSettings
impl Debug for ColorSettings
Source§impl Default for ColorSettings
impl Default for ColorSettings
Source§fn default() -> ColorSettings
fn default() -> ColorSettings
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ColorSettings
impl !RefUnwindSafe for ColorSettings
impl !Send for ColorSettings
impl !Sync for ColorSettings
impl Unpin for ColorSettings
impl !UnwindSafe for ColorSettings
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more