:: Re: [DNG] uxterm colors: was Steve'…
Inizio della pagina
Delete this message
Reply to this message
Autore: Didier Kryn
Data:  
To: dng@lists.dyne.org
Oggetto: Re: [DNG] uxterm colors: was Steve's Gnome usage poll [Was: Re: Gnome - Introducing stronger dependencies on systemd
Le 26/06/2025 à 06:17, Erik Christiansen via Dng a écrit :
> Dunno how to faff directly with raw hex rgb values on the commandline,


On a colored xterm, just try the following:

printf '\033[01;32mGreen\033[01;31mRed\033[01;34mBlue\033[00mDefault\n'

\033 is the ESCAPE character; followed by "[01;XXm", it sets the
foreground color, where XX is the following:

31=red, 32=green, 34=blue, 33=yellow etc. You can certainly find the
whole list on the web.

"\033[00m" resets the default color.

There are also sequences to set the background color, to highlight,
underline and blink.

--     Didier