use owo_colors::{DynColors, OwoColorize};
#[derive(Clone, Copy)]
pub struct Color {
r: u8,
g: u8,
b: u8,
}
impl Color {
pub const fn new(r: u8, g: u8, b: u8) -> Self {
Self { r, g, b }
}
pub fn fg_str(&self, text: &str) -> String {
let dyn_color = DynColors::Rgb(self.r, self.g, self.b);
text.color(dyn_color).to_string()
}
}