Format: echo "/033[word background color; font color m string/033[control code"
If you simply display the font color can be fixed control code bit 0m.
Format: echo "/033[word background color; font Color m string/033[0m"
Word background color range: 40-49
+ : Black A : Crimson the : Green + : Yellow - : Blue $ : Purple $ : Dark green A: White
Word Color: 30-39
- : Black to : Red + : Green - : Yellow the : Blue * : Purple $ : Dark green Panax Notoginseng: White
ANSI Control code
\ -[0m close all properties \ -[01m set high brightness \ -[04m underline \ -[05m blinking \ -[07m reverse display \ -[08m blanking \ -[30m--\ -[37m set foreground color \ -[40m--\ -[47m set background color \ -[NA cursor moves up n rows \ -[NB cursor moves down n lines \ -[NC cursor shifts right n rows \ -[ND cursor moves left n rows \ -[y;xh set cursor position \ -[2J clear screen \ -[K clears the contents from the cursor to the end of the line \ -[s save cursor position \ -[u restore cursor position \ -[?25lHide cursor \ -[? 25h display cursor
For example:
" \033[31m \033[05m Please confirm your operation, enter [y/n] \033[0m""\033[31m \033[05m Please confirm your operation, enter [y/ N] \033[0m"
Shell Display with color font