Struct RgbColor
pub struct RgbColor(pub u8, pub u8, pub u8);
24-bit ANSI RGB color codes
Fields
0: u81: u82: u8
Implementations
impl RgbColor
fn on(self, background: impl Into<Color>) -> StyleCreate a [
Style][crate::Style] with this as the foregroundconst fn on_default(self) -> StyleCreate a [
Style][crate::Style] with this as the foregroundconst fn r(self) -> u8Red
const fn g(self) -> u8Green
const fn b(self) -> u8Blue
fn render_fg(self) -> impl Display + CopyRender the ANSI code for a foreground color
fn render_bg(self) -> impl Display + CopyRender the ANSI code for a background color
Trait Implementations
impl Clone for RgbColor
fn clone(&self) -> Self
impl Copy for RgbColor
impl Debug for RgbColor
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for RgbColor
impl From<(u8, u8, u8)> for RgbColor
fn from(inner: (u8, u8, u8)) -> Self
impl Hash for RgbColor
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Ord for RgbColor
fn cmp(&self, other: &Self) -> Ordering
impl PartialEq for RgbColor
fn eq(&self, other: &Self) -> bool
impl PartialOrd for RgbColor
fn partial_cmp(&self, other: &Self) -> Option<Ordering>