pub struct Palette { /* private fields */ }Expand description
Default visual palette for Sim;Engine demos and early integrations.
Applications can ignore this and provide their own colors. The palette exists so examples start from a polished baseline instead of bare grayscale.
Implementations§
Source§impl Palette
impl Palette
Sourcepub const fn from_colors(colors: [Color; 8]) -> Self
pub const fn from_colors(colors: [Color; 8]) -> Self
Builds a palette from colors ordered as background, surface, grid, axis, primary, secondary, accent, and warning.
Sourcepub const fn background(self) -> Color
pub const fn background(self) -> Color
Returns the main background color.
Trait Implementations§
impl Copy for Palette
impl StructuralPartialEq for Palette
Auto Trait Implementations§
impl Freeze for Palette
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnsafeUnpin for Palette
impl UnwindSafe for Palette
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