forlang.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
settextcolor
 Summary Example                         Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     The settextcolor function sets the current text color to the color
     index specified by <index>. The default text color is the same as
     the maximum color index.
 
     The settextcolor routine sets the color for the outtext function.
     It does not affect the color of the WRITE statement or the color of
     text output with the outgtext font routine. Use the setcolor
     function to change the color of font output.
 
     In text color mode, you can specify a color index in the range
     0-31. The colors in the range 0-15 are interpreted as normal.
     Colors in the range 16-31 are the same as those in the range 0-15
     but also have blinking text. The normal color range is defined
     below:
 
     Index     Color
 
     0         Black
     1         Blue
     2         Green
     3         Cyan
     4         Red
     5         Magenta
     6         Brown
     7         White
     8         Dark gray
     9         Light blue
     10        Light green
     11        Light cyan
     12        Light red
     13        Light magenta
     14        Yellow
     15        Bright white
 
     In every text mode, including monochrome, the getvideoconfig
     function returns the value 32 for the number of available colors.
     The value 32 indicates the range of values (0-31) accepted by the
     settextcolor function. This includes sixteen normal colors (0-15)
     and sixteen blinking colors (16-31).
 
     Blinking is selected by adding 16 to the normal color value. Some
     color values are redundant because monochrome text mode has fewer
     unique display attributes. However, because blinking is selected in
     the same manner, monochrome text mode has the same range (0-31) as
     other text modes.
 
     Return Value
 
     The function returns the color index of the previous text color.
                                    -♦-