How to set the output color - [FORMAT..COLOR ..]

1, format

FORMAT may be used to adjust the output of the color, format syntax is as follows:

Once set ON by setting the format FORMAT statement statement will apply to all subsequent output OFF option is closed again until use, which specific list of options:

COLOR n [ON | OFF]: set the background color of the list row.
INTENSIFIED [ON | OFF]: Set whether to strengthen the field output.
INVERSE [ON | OFF]: set whether the background color of the text inverted output.
HOTSPOT [ON | OFF]: Move the cursor to a hand display type, click to select the event trigger line (hot spots).
INPUT [ON | OFF]: setting input fields that allow a user input.
RESET: to restore all default values set above.

WRITE colors can come out in fact very small, probably only eight species, as follows:

COLOR type and description
 No  COLOR  DESC
 0  COL_BACKGROUND  Background(GUI-specific)
 1  COL_HEADING  Headers(grayish blue)
 2  COL_NORMAL  List body(bright gray)
 3  COL_TOTAL  Totals(yellow)
 4  COL_KEY  Key columns(bluish green)
 5  COL_POSITIVE  Positive threshold value(green)
 6  COL_NEGATIVE  Negative threshold value(red)
 7  COL_GROUP  Control levels(violet)

Example code:

Run as follows:

2, color

The second method is the use of color keyword write the statement, the syntax is as follows:

8 colors can be output, as follows:

operation result:

the above.

Guess you like

Origin www.cnblogs.com/lvdong18847870057/p/12553202.html