Skip to main content

push_sgr

Function push_sgr 

Source
pub fn push_sgr(out: &mut String, style: Style)
Expand description

Appends the SGR codes for style’s non-default foreground/background to out, as a single \x1b[...m sequence.

A Color::Default channel is left unset, relying on the caller’s preceding \x1b[0m reset rather than emitting an explicit 39/49 reset code. Emits nothing at all when both channels are Color::Default.