Prev Next color

Setting Colors

Syntax
$command colorname$$
$command%red%green%blue%$$

Purpose
The output specified by command is changed to the color specified by colorname . The text following command is a delimiter sequence .

command
The value command must be one of the following values:
command Affected text Default value Style
codecolor inside code and codep commands blue no
hilitecolor color used for hilite text purple no
errorcolor used by OMhelp for errors in output files red no
bgcolor background color white yes
textcolor color of normal text black yes
linkcolor color used for cross reference linking blue yes visitcolor color used for cross reference linking that have been visited purple yes

colorname
The following is a list of the valid values for colorname :
      black green
silver lime
gray olive
white yellow
maroon navy
red blue
purple teal
fuchsia aqua
These values are case in-sensitive, and leading and trailing white space is ignored.

RGB Values
In addition to the color names above, you can use the red , blue , green syntax to describe a color (RGB value). The values red , blue , and green must be unsigned integers between 0 and 255. They represent the primary color mix for the RGB code of the color being specified. Leading and trailing white space in an RGB value is ignored.

Style
Some of the colors are specified as styles in the colorname table above. If command is specified by a style, it can only appear once per section.

Root Section
If a color command appears in the root section , it specifies the default all the other sections in the web site. Otherwise, the default color is the one in the colorname table above.

Non-Style Examples

codecolor
The following text
 
     $codecolor green$$
     $codep
          This text is green.
     $$
     $codecolor blue$$
     $codep
          This text is blue.
     $$
results in the following output:
 
     This text is green.
 
     This text is blue.

errorcolor
The following text
 
     $errorcolor blue$$
     $codecolor red$$
     $codep
          This text is red but it is not an error message.
     $$
     $errorcolor red$$
     $codecolor blue$$
results in the following output:
 
     This text is red but not an error.
Note that if a spelling error occurred in the codep command, the corresponding word would have been in blue instead of red.

hilitecolor
The commands
 
     $hilitecolor purple$$
     $hilitecmd codep$$
     $hiliteseq%%codecolor%%%$$
     $codep
          The codecolor command is useful.
     $$
results in the following output
 
     The codecolor command is useful.

Style Examples

bgcolor
The command
 
     $bgcolor/240/240/240/$$
appears at the beginning of this section. That is why the background color for this section is light gray.

textcolor
The command
 
     $textcolor/100/100/100/$$
appears at the beginning of this section. That is why the normal text color for this section is dark gray.

linkcolor
The command
 
     $linkcolor green$$
appears at the beginning of this section. That is why the links appear in green for this section.
Input File: color.omh