setcolor and setcolour
allow the user to set the screen to a specific color.
Both foreground and background colors can be set
independently in a range of 16 colors.
setcolor can also set the reverse video and graphics character colors.
setcolor with no arguments produces a usage message that
displays all available colors, then resets the screen to its
previous state.
For example, the following strings are possible colors:
blue
magenta
brown
black
lt_blue
lt_magenta
yellow
gray
cyan
white
green
red
lt_cyan
hi_white
lt_green
lt_red
Options
The following options are available for setcolor and setcolour.
In the arguments below,
color is taken from the above list.
-n
Sets the screen to normal white characters on black background.
color [color]
Sets the foreground to the first color.
Sets background to second color if a second color choice is specified.
-bcolor
Sets the background to the specified color.
-rcolor color
Set the foreground reverse video characters to the first color.
Set reverse video characters' background to second color.
-gcolor color
Set the foreground graphics characters to the first color.
Set graphics characters' background to second color.
-ocolor
Sets the color of the screen border (over scan region).
To reset border color, use -o black.
-ppitch duration
Set the pitch and duration of the bell.
Pitch is the period in microseconds, and duration is measured
in fifths of a second.
When using this option, a <Ctrl>-G (bell) must be echoed to
the screen for the command to work.
For example:
setcolor -p 2500 2echo ^G
-cfirst last
Set the first and last scan lines of the cursor.
Notices
The ability of setcolor to set any of these described
functions is ultimately dependent on the ability of devices to
support them.
For example, the -o option does not work
on the Color Graphics Adapter (CGA).
setcolor emits an escape sequence that
may or may not have an effect on monochrome devices.
Occasionally changing the screen color can help prolong the life of
your monitor.