pub struct RgbColor {
pub r: u8,
pub g: u8,
pub b: u8,
}Expand description
RGB color
Fields§
§r: u8Red component (0-255)
g: u8Green component (0-255)
b: u8Blue component (0-255)
Implementations§
Source§impl RgbColor
impl RgbColor
Sourcepub fn to_ansi_fg(&self) -> String
pub fn to_ansi_fg(&self) -> String
Convert to ANSI true-color escape sequence (foreground)
Sourcepub fn to_ansi_bg(&self) -> String
pub fn to_ansi_bg(&self) -> String
Convert to ANSI true-color escape sequence (background)
Sourcepub fn for_pressure_level(level: PressureLevel) -> Self
pub fn for_pressure_level(level: PressureLevel) -> Self
Get color for pressure level
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RgbColor
impl RefUnwindSafe for RgbColor
impl Send for RgbColor
impl Sync for RgbColor
impl Unpin for RgbColor
impl UnsafeUnpin for RgbColor
impl UnwindSafe for RgbColor
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