pub enum ColorAttribute {
TrueColorWithPaletteFallback(SrgbaTuple, PaletteIndex),
TrueColorWithDefaultFallback(SrgbaTuple),
PaletteIndex(PaletteIndex),
Default,
}Expand description
Specifies the color to be used when rendering a cell. This is the
type used in the CellAttributes struct and can specify an optional
TrueColor value, allowing a fallback to a more traditional palette
index if TrueColor is not available.
Variants§
TrueColorWithPaletteFallback(SrgbaTuple, PaletteIndex)
Use RgbColor when supported, falling back to the specified PaletteIndex.
TrueColorWithDefaultFallback(SrgbaTuple)
Use RgbColor when supported, falling back to the default color
PaletteIndex(PaletteIndex)
Use the specified PaletteIndex
Default
Use the default color
Implementations§
Trait Implementations§
Source§impl Clone for ColorAttribute
impl Clone for ColorAttribute
Source§fn clone(&self) -> ColorAttribute
fn clone(&self) -> ColorAttribute
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 ColorAttribute
impl Debug for ColorAttribute
Source§impl Default for ColorAttribute
impl Default for ColorAttribute
Source§impl<'de> Deserialize<'de> for ColorAttribute
impl<'de> Deserialize<'de> for ColorAttribute
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 From<AnsiColor> for ColorAttribute
impl From<AnsiColor> for ColorAttribute
Source§impl From<ColorSpec> for ColorAttribute
impl From<ColorSpec> for ColorAttribute
Source§impl FromDynamic for ColorAttribute
impl FromDynamic for ColorAttribute
fn from_dynamic( value: &Value, options: FromDynamicOptions, ) -> Result<Self, Error>
Source§impl Hash for ColorAttribute
impl Hash for ColorAttribute
Source§impl PartialEq for ColorAttribute
impl PartialEq for ColorAttribute
Source§impl Serialize for ColorAttribute
impl Serialize for ColorAttribute
Source§impl ToDynamic for ColorAttribute
impl ToDynamic for ColorAttribute
fn to_dynamic(&self) -> Value
impl Copy for ColorAttribute
impl Eq for ColorAttribute
impl StructuralPartialEq for ColorAttribute
Auto Trait Implementations§
impl Freeze for ColorAttribute
impl RefUnwindSafe for ColorAttribute
impl Send for ColorAttribute
impl Sync for ColorAttribute
impl Unpin for ColorAttribute
impl UnwindSafe for ColorAttribute
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