Format: Echo "/033 [text background color; font color M string/033 [control code"
If the font color is displayed, the font color can be fixed to 0 MB.
Format: Echo "/033 [text background color; font color M string/033 [0 m"
Color Range: 40-49
40: Black
41: dark red
42: Green
43: Yellow
44: Blue
45: Purple
46: dark green
47: white
Color: 30-39
30: Black
31: red
32: Green
33: Yellow
34: Blue
35: Purple
36: dark green
37: white
ANSI control code
\ 33 [0 m close all properties
\ 33 [01 M set high brightness
\ 33 [04 m underline
\ 33 [05 m flashing
\ 33 [07 m reverse display
\ 33 [08 M blanking
\ 33 [30 m -- \ 33 [37 m sets the foreground color
\ 33 [40 m -- \ 33 [47 m set the background color
\ 33 [move the NA cursor up n rows
\ 33 [move the Nb cursor down n rows
\ 33 [move the NC cursor right n rows
\ 33 [Nd cursor shifts n rows left
\ 33 [Y; XH: Set the cursor position
\ 33 [2j clear screen
\ 33 [k clear content from cursor to end of line
\ 33 [s Save the cursor position
\ 33 [U restore cursor position
\ 33 [? 25l hide the cursor
\ 33 [? 25 h show cursor
For example:
Change the font to red and keep flashing
# Echo-e "\ 033 [31 m \ 033 [05 M Please confirm your operation, enter [Y/n] \ 033 [0 m"
Or
# Echo-e "\ 033 [31 m \ 033 [05 M Please confirm your operation, enter [Y/n] \ 033 [0 m"