Language:
Русский
English
TextColor (procedure) (Crt unit)
Selects the foreground character color.
Declaration
procedure TextColor(Color: Byte);
Target
Real, Protected
Remarks
Color is an integer expression in the range 0..15, corresponding to one of the text color constants defined in Crt.
There is a byte-type variable Crt--TextAttr--that is used to hold the current video attribute. TextColor sets bits 0-3 to Color. If Color is greater than 15, the blink bit (bit 7) is also set; otherwise, it is cleared.
You can make characters blink by adding 128 to the color value. The Blink constant is defined for that purpose; in fact, for compatibility with Turbo Pascal 3.0, any Color value above 15 causes the characters to blink. The foreground of all characters subsequently written will be in the specified color.