pub struct UiPalette {
pub canvas: Rgba,
pub surface: Rgba,
pub surface_hover: Rgba,
pub surface_selected: Rgba,
pub text: Rgba,
pub text_muted: Rgba,
pub border: Rgba,
pub accent: Rgba,
pub accent_foreground: Rgba,
pub positive: Rgba,
pub destructive: Rgba,
pub scrim: Rgba,
}Expand description
Renderer-neutral application colors derived from a diff palette.
Fields§
§canvas: Rgba§surface: Rgba§surface_hover: Rgba§surface_selected: Rgba§text: Rgba§text_muted: Rgba§border: Rgba§accent: Rgba§accent_foreground: Rgba§positive: Rgba§destructive: Rgba§scrim: RgbaImplementations§
Source§impl UiPalette
impl UiPalette
Sourcepub const fn control_style(
self,
variant: ButtonVariant,
state: ControlState,
) -> SemanticStyle
pub const fn control_style( self, variant: ButtonVariant, state: ControlState, ) -> SemanticStyle
Resolves an action control without renderer-specific state ordering.
Sourcepub const fn selection_style(self, state: SelectionState) -> SemanticStyle
pub const fn selection_style(self, state: SelectionState) -> SemanticStyle
Resolves selectable content consistently across renderers.
Sourcepub const fn notice_style(self, tone: NoticeTone) -> SemanticStyle
pub const fn notice_style(self, tone: NoticeTone) -> SemanticStyle
Resolves the foreground used to communicate a notice tone.
Trait Implementations§
impl Copy for UiPalette
impl Eq for UiPalette
Source§impl From<&DiffPalette> for UiPalette
impl From<&DiffPalette> for UiPalette
Source§fn from(palette: &DiffPalette) -> Self
fn from(palette: &DiffPalette) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for UiPalette
Auto Trait Implementations§
impl Freeze for UiPalette
impl RefUnwindSafe for UiPalette
impl Send for UiPalette
impl Sync for UiPalette
impl Unpin for UiPalette
impl UnsafeUnpin for UiPalette
impl UnwindSafe for UiPalette
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
Mutably borrows from an owned value. Read more