pub enum ColorRef {
Palette(PaletteKey),
Literal(Color),
Default,
}Expand description
A color by reference. Palette is the normal path; Literal is
the escape hatch for a one-off a palette entry would
over-generalize; Default means the terminal/window default
channel.
Variants§
Trait Implementations§
impl Eq for ColorRef
Source§impl From<&'static str> for ColorRef
A bare string is the common case: a palette-key reference. So
spec.fg("purple") means “the palette’s mauve”, not a literal —
reference-not-absolute by default (design §2). Use
ColorRef::Literal(..) explicitly for a one-off color.
impl From<&'static str> for ColorRef
A bare string is the common case: a palette-key reference. So
spec.fg("purple") means “the palette’s mauve”, not a literal —
reference-not-absolute by default (design §2). Use
ColorRef::Literal(..) explicitly for a one-off color.
Source§impl From<PaletteKey> for ColorRef
impl From<PaletteKey> for ColorRef
Source§fn from(k: PaletteKey) -> Self
fn from(k: PaletteKey) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for ColorRef
Auto Trait Implementations§
impl Freeze for ColorRef
impl RefUnwindSafe for ColorRef
impl Send for ColorRef
impl Sync for ColorRef
impl Unpin for ColorRef
impl UnsafeUnpin for ColorRef
impl UnwindSafe for ColorRef
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