colour

Change terminal colour

Description

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.

Command line options

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
-gPrint the current terminal colour, followed by a new line
-GPrint the current terminal colour, omit new line in the output

Sample use

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

Supported Platforms

☂︎ Windows

Prerequisites and build instructions

© 2023 Georgi Valkov

https://httpstorm.com/download/windows/colour/