Rundumschlag zu allem, was es über Farben im Terminal zu wissen gibt.
The ANSI escape sequences you’re looking for are the Select Graphic Rendition subset. All of these have the form
\033[XXXm
where
XXX
is a series of semicolon-separated parameters.