Similar to the color
command, with the main difference being that color
repaints the entire window, while this tool only affects characters printed
after the colour is changes. This tool also allows foreground and background
colours to be controlled individually.
colour [-b [0-f]] [-f [0-f] [0-f] | |
---|---|
[0-f][0-f] | Set both background and foreground colour |
-b[0-f] | Set only the background colour |
-f[0-f] | Set only the foreground colour |
[0-f] | Set only the foreground colour |
-g | Print the current terminal colour, followed by a new line |
-G | Print the current terminal colour, omit new line in the output |
colour f4# background f (white), foreground 4 (red) colour- bf# background f (white) colour- f4# foreground f (white) colour- g# prints f4 colour-? # show usage colour- ff& echo white& colour- fa& echo green& colour- fc& echo red& colour- f7
☂︎ Windows