COLOR phrase
- Last Updated: July 20, 2021
- 3 minute read
- OpenEdge
- Version 12.2
- Documentation
Specifies a video attribute or color. The COLOR phrase is superseded by the FGCOLOR and BGCOLOR options in graphical user interfaces and by the PFCOLOR and DCOLOR options in character interfaces. The COLOR phrase is supported only for backward compatibility with Progress Version 7 or earlier.
Syntax
|
- NORMAL, INPUT, MESSAGES
- The three standard colors ABL uses for screen displays. ABL
uses NORMAL to display fields, INPUT to display input fields, and MESSAGES
to display items in the message area.
Following are the NORMAL defaults:
- Windows — On a color monitor, the default colors are a blue background and a white foreground. On a monochrome monitor, the default colors are a standard background and foreground, depending on the monitor.
- UNIX — The default colors are the normal display mode of your terminal.
Following are the INPUT defaults:
- Windows — On a color monitor, the default colors are a light gray background and a blue foreground. On a monochrome monitor, the default underlines fields that require input.
- UNIX — The default colors depend on the type of terminal and how INPUT is defined in the protermcap file, but it is usually underlining.
Following are the MESSAGES defaults:
- Windows — On a color monitor, the defaults are the same as for INPUT. On a monochrome monitor, the default is reverse video.
- UNIX — The defaults depend on the type of terminal and how MESSAGES is defined in the protermcap file, but it is usually reverse video. (The protermcap file supplied with ABL supplies default attributes for NORMAL, INPUT, and MESSAGES for all defined terminals.)
- protermcap-attribute
- You use the protermcap-attribute option only if you are using UNIX. This is the name assigned to the attribute in the protermcap file (for example, RED, BLINK, etc.). See Manage ABL Applications for a description of the protermcap file.
- dos-hex-attribute
- A hex string with a value of 00 through FF.
- [ BLINK- ][ BRIGHT- ][ fgnd-color ][ bgnd-color ]
- Names specific colors you want to use for the screen foreground
and background. You use this option only if you are using Windows,
and usually only if you use a color monitor. The following table
lists the colors you can use for fgnd-color and bgnd-color.
Table 1. Windows colors Color Abbreviation Black Bla, Blk Blue Blu Green Gre, Grn Cyan C Red Red Magenta Ma Brown Bro, Brn Gray Gra, Gry Dark-Gray D-Gra Light-Blue Lt-Blu Light-Green Lt-Gre Light-Cyan Lt-C Light-Red Lt-Red Light-Magenta Lt-Ma Light-Brown Lt-Bro Yellow Y White W If fgnd-color is omitted, then the system uses the foreground corresponding to NORMAL. If bgnd-color is omitted, then the system uses the background corresponding to NORMAL. If NORMAL, INPUT, or MESSAGES is specified for fgnd-color or bgnd-color, then the system uses the foreground or background color of the specified standard color.
- [ BLINK- ][ RVV- ][ UNDERLINE- ][ BRIGHT- ][ fgnd-color ]
- Names specific attributes you want to use for the screen display. Use this option only if you are using Windows, and usually only if you use a monochrome monitor. Normally, you would never specify fgnd-color.
- VALUE ( expression )
- An expression with a value that results in one of the options in the COLOR phrase.
Example
The following procedure displays a random number of asterisks, in a random color, column, and row in 10 different occurrences. The COLOR statement displays the asterisks in one of the three colors stored in the elements of the hilite array. The COLOR phrase in this example is VALUE ( hilite[ RANDOM( 1,3 ) ]. The DISPLAY statement uses the color determined in the COLOR statement to display a random number of asterisks.
r-colphr.p
|
Notes
- For an application to use this COLOR phrase, it must use the default color table in the installed environment.
- The system ignores the color phrase entry for overlay frames on spacetaking terminals.
- For more information on the
protermcapfile, see Manage ABL Applications.