1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; use crate::style::Color; /// Represents a foreground or background color. /// /// This can be converted to a [Colors](struct.Colors.html) by calling `into()` and applied /// using the [SetColors](struct.SetColors.html) command. #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[derive(Copy, Clone, Debug, PartialEq, Eq, Ord, PartialOrd, Hash)] pub enum Colored { /// A foreground color. ForegroundColor(Color), /// A background color. BackgroundColor(Color), }