Bash is capable of generating a huge spectrum of colors for text. Here is a small code in shell script which generates all the 256 different colors bash can render:
for i in {0..255}; do printf "\x1b[38;5;${i}mCLR-${i}\t"; done; echo; reset;
The last echo is for printing a blank like after the output, without that the command prompt would appear at the end of the output. More import is reset present at the end, without which your terminal might not go back to the original settings.
In case you are wondering how to print colored output in terminal, please read:
for i in {0..255}; do printf "\x1b[38;5;${i}mCLR-${i}\t"; done; echo; reset;
The last echo is for printing a blank like after the output, without that the command prompt would appear at the end of the output. More import is reset present at the end, without which your terminal might not go back to the original settings.
In case you are wondering how to print colored output in terminal, please read:
- How to print using colors and arguments
- A better way to print colors without using obfuscated escape sequences