pub enum ColorTheme {
Show 14 variants
Cyan,
Green,
White,
Magenta,
Yellow,
Red,
Blue,
Rainbow,
RainbowVertical,
GradientWarm,
GradientCool,
GradientOcean,
GradientNeon,
GradientFire,
}Expand description
Color theme for the clock display.
Variants§
Cyan
Green
White
Magenta
Yellow
Red
Blue
Rainbow
RainbowVertical
GradientWarm
GradientCool
GradientOcean
GradientNeon
GradientFire
Implementations§
Source§impl ColorTheme
impl ColorTheme
Sourcepub fn is_dynamic(self) -> bool
pub fn is_dynamic(self) -> bool
Check if this theme requires per-character coloring.
Sourcepub fn color_at_position(
self,
x: usize,
y: usize,
width: usize,
height: usize,
) -> Color
pub fn color_at_position( self, x: usize, y: usize, width: usize, height: usize, ) -> Color
Get color at a specific position for dynamic themes.
x is the horizontal position (column), y is the vertical position (row).
width and height are the total dimensions for normalization.
Sourcepub fn display_name(self) -> &'static str
pub fn display_name(self) -> &'static str
Get display name for the theme.
Trait Implementations§
Source§impl Clone for ColorTheme
impl Clone for ColorTheme
Source§fn clone(&self) -> ColorTheme
fn clone(&self) -> ColorTheme
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColorTheme
impl Debug for ColorTheme
Source§impl Default for ColorTheme
impl Default for ColorTheme
Source§fn default() -> ColorTheme
fn default() -> ColorTheme
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ColorTheme
impl<'de> Deserialize<'de> for ColorTheme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ColorTheme
impl PartialEq for ColorTheme
Source§impl Serialize for ColorTheme
impl Serialize for ColorTheme
impl Copy for ColorTheme
impl Eq for ColorTheme
impl StructuralPartialEq for ColorTheme
Auto Trait Implementations§
impl Freeze for ColorTheme
impl RefUnwindSafe for ColorTheme
impl Send for ColorTheme
impl Sync for ColorTheme
impl Unpin for ColorTheme
impl UnwindSafe for ColorTheme
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more