The read-only number register
.coloris 1 if colors are active, 0 otherwise.
colorsets a global flag; it does not produce a token. Similar to the
cprequest, you should use it at the beginning of your document to control color output.
Colors can be also turned off with the -c command line option.
Color components can be given either as a hexadecimal string or as positive decimal integers in the range 0–65535. A hexadecimal string contains all color components concatenated. It must start with either
##; the former specifies hex values in the range 0–255 (which are internally multiplied by 257), the latter in the range 0–65535. Examples:
##ffff0000ffff(magenta). The default color name value is device-specific (usually black). It is possible that the default color for
\Mis not identical..defcolor darkgreen rgb 0.1f 0.5f 0.2f
fis the default scaling indicator for the
defcolorrequest, thus the above statement is equivalent to.defcolor darkgreen rgb 0.1 0.5 0.2
.gcolor red these are in red .gcolor and these words are in black.\m[red]these are in red\m and these words are in black.
\mreturns to the previous color, as does a call to
gcolorwithout an argument.
The drawing color is associated with the current environment (see Environments).
\mdoesn't produce an input token in
gtroff. As a consequence, it can be used in requests like
mc(which expects a single character as an argument) to change the color on the fly:.mc \m[red]x\m
A red ellipse can be created with the following code:\M[red]\h'0.5i'\D'E 2i 1i'\M
\Mreturns to the previous fill color, as does a call to
fcolorwithout an argument.
The fill color is associated with the current environment (see Environments).
\Mdoesn't produce an input token in