owen 0.0.1

Terminal User Interface library
Documentation
pub use crossterm::style::Color;

#[derive(Clone, Copy, PartialEq, Eq)]
pub struct Style {
    pub foreground: Color,
    pub background: Color,
}

impl Default for Style {
    fn default() -> Self {
        Style {
            foreground: Color::Reset,
            background: Color::Reset,
        }
    }
}

impl Style {
    // Change the foreground when building a style
    pub fn foreground(mut self, color: Color) -> Self {
        self.foreground = color;
        self
    }

    // Change the background when building a style
    pub fn background(mut self, color: Color) -> Self {
        self.background = color;
        self
    }
}