use crate::Paint; pub fn default(msg: D) -> Paint { Paint::new(msg) } pub fn wrap(msg: D) -> Paint { Paint::wrapping(msg) } pub fn negative(msg: D) -> Paint { Paint::red(msg) } pub fn positive(msg: D) -> Paint { Paint::green(msg) } pub fn primary(msg: D) -> Paint { Paint::magenta(msg) } pub fn secondary(msg: D) -> Paint { Paint::blue(msg) } pub fn tertiary(msg: D) -> Paint { Paint::cyan(msg) } pub fn yellow(msg: D) -> Paint { Paint::yellow(msg) } pub fn hint(msg: D) -> Paint { Paint::yellow(msg) } pub fn faint(msg: D) -> Paint { Paint::fixed(236, msg) } pub fn highlight(input: D) -> Paint { Paint::green(input).bold() } pub fn badge_primary(input: D) -> Paint { if Paint::is_enabled() { Paint::magenta(format!(" {input} ")).invert() } else { Paint::new(format!("❲{input}❳")) } } pub fn badge_yellow(input: D) -> Paint { if Paint::is_enabled() { Paint::yellow(format!(" {input} ")).invert() } else { Paint::new(format!("❲{input}❳")) } } pub fn badge_positive(input: D) -> Paint { if Paint::is_enabled() { Paint::green(format!(" {input} ")).invert() } else { Paint::new(format!("❲{input}❳")) } } pub fn badge_negative(input: D) -> Paint { if Paint::is_enabled() { Paint::red(format!(" {input} ")).invert() } else { Paint::new(format!("❲{input}❳")) } } pub fn badge_secondary(input: D) -> Paint { if Paint::is_enabled() { Paint::blue(format!(" {input} ")).invert() } else { Paint::new(format!("❲{input}❳")) } } pub fn bold(input: D) -> Paint { Paint::new(input).bold() } pub fn dim(input: D) -> Paint { Paint::new(input).dim() } pub fn italic(input: D) -> Paint { Paint::new(input).italic().dim() }