Skip to content

Demonstrate how to use bash script to print SGR to change terminal display colors

License

Notifications You must be signed in to change notification settings

WingTillDie/bash-SGR-color-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bash-SGR-color-demo

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: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.
Printing SGR on terminal Type /\$' in man bash for more info. search for the shell feature in manpage of bash

About

Demonstrate how to use bash script to print SGR to change terminal display colors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages