Is it possible to only reset the background color or text color back to default (not both!)Example:echo -e \033[32;41mFoo bar\033[30m baz # Doesn't reset background colorecho -e \033[32;41mFoo bar\033[0m baz # Resets the background color and text colorIs there anyway to do this?I know I can assign the background color in the second statement, but the color will be unknown. (echo -e \033[32;41mFoo bar\033[0m baz)
Setting only of background or text color back to default
terminal;colors
The colors 39 and 49 means the default color, for the foreground and the background respectively. \e[0m is equivalent to \e[22;24;25;27;28;39;49m (not bold, not underlined, not blinking, not inverse, not hidden, default foreground, default background).You can find the terminal control sequences in the xterm documentation (most terminals follow xterm's lead nowadays).