Demonstrate how to use bash script to print SGR to change terminal display colors
Usage: ./color.bash
If your are not able to run the script on Termux on Android, try run termux-fix-shebang color.bash
before using the script.
SGR is ANSI escape sequences to change terminal display colors, visit
Wikipedia for more info about it.
Running result of the script on Termux:
Entering hex code in bash to change terminal color is also possible, e.g.
printf '\e[48;2;'$((0xff))';0;0m'' '
and
printf '\e[48;2;''255'';0;0m'' '
are the same.
Type /\$' in man bash
for more info.