pub struct Theme {
pub fg: Option<Color>,
pub bg: Option<Color>,
pub style: Style,
}
Expand description
Represents a terminal output theme.
A theme consists of a foreground and background color as well as a style.
Fields§
§fg: Option<Color>
Foreground color
bg: Option<Color>
Background color
style: Style
Style
Implementations§
source§impl Theme
impl Theme
sourcepub fn new<F, B, S>(fg: F, bg: B, style: S) -> Themewhere
F: Into<Option<Color>>,
B: Into<Option<Color>>,
S: Into<Option<Style>>,
pub fn new<F, B, S>(fg: F, bg: B, style: S) -> Themewhere F: Into<Option<Color>>, B: Into<Option<Color>>, S: Into<Option<Style>>,
Creates a new theme with given values.
Note
In order to create a Theme using default values you might want to use
Theme::default()
instead.
sourcepub fn fg<F>(self, fg: F) -> Themewhere
F: Into<Option<Color>>,
pub fn fg<F>(self, fg: F) -> Themewhere F: Into<Option<Color>>,
Sets the foreground color on the given Theme and returns the new.