pub struct Palette {
pub primary_hex: String,
pub accent_hex: String,
pub ansi256_primary: u8,
pub ansi256_accent: u8,
}Expand description
Two-color palette derived from the same seed as the nickname/emoji.
Primary is bounded to be terminal-readable on both light and dark backgrounds (L ∈ [0.50, 0.65]). Accent shifts hue +30° and lifts L to [0.65, 0.80] for highlights. Saturation is bounded [0.55, 0.80] to avoid muddy / neon extremes.
Fields§
§primary_hex: StringPrimary color as #rrggbb. Use for the nickname/emoji glyph itself.
accent_hex: StringAccent color as #rrggbb. Use for highlights, borders, accents.
ansi256_primary: u8Primary mapped onto the ANSI 256-color cube (16..=231).
ansi256_accent: u8Accent mapped onto the ANSI 256-color cube (16..=231).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Palette
impl<'de> Deserialize<'de> for Palette
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
impl Eq 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
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§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.