Hi volunteers.
Here is a little program, that I think shows all of the console foreground colors (except for black).
DTB.
[code=thinbasic]'-------------------------------------------------------
' FILE = Console_Colors.tbasicc
'-------------------------------------------------------
Uses "Console"
Begin Const
%BLACK = 00
%BLUE = 01
%GREEN = 02
%CYAN = 03
%RED = 04
%MAGENTA = 05
%BROWN = 06
%WHITE = 07
%GRAY = 08
%LIGHTBLUE = 09
%LIGHTGREEN = 10
%LIGHTCYAN = 11
%LIGHTRED = 12
%LIGHTMAGENTA = 13
%YELLOW = 14
%HIWHITE = 15
End Const
'-------------------------------------------------------
Function TBMAIN()
Dim I, J As Integer
J = 5
For I = 1 TO J
WRITECOLOREDLINE("BLUE", %BLUE)
Next
For I = 1 TO J
WRITECOLOREDLINE("GREEN", %GREEN)
Next
For I = 1 TO J
WRITECOLOREDLINE("CYAN", %CYAN)
Next
For I = 1 TO J
WRITECOLOREDLINE("RED", %RED)
Next
For I = 1 TO J
WRITECOLOREDLINE("MAGENTA", %MAGENTA)
Next
For I = 1 TO J
WRITECOLOREDLINE("BROWN", %BROWN)
Next
For I = 1 TO J
WRITECOLOREDLINE("WHITE", %WHITE)
Next
For I = 1 TO J
WRITECOLOREDLINE("GRAY", %GRAY)
Next
For I = 1 TO J
WRITECOLOREDLINE("LIGHT BLUE", %LIGHTBLUE)
Next
For I = 1 TO J
WRITECOLOREDLINE("LIGHT GREEN", %LIGHTGREEN)
Next
For I = 1 TO J
WRITECOLOREDLINE("LIGHT CYAN", %LIGHTCYAN)
Next
For I = 1 TO J
WRITECOLOREDLINE("LIGHT RED", %LIGHTRED)
Next
For I = 1 TO J
WRITECOLOREDLINE("LIGHT MAGENTA", %LIGHTMAGENTA)
Next
For I = 1 TO J
WRITECOLOREDLINE("YELLOW", %YELLOW)
Next
For I = 1 To J
WRITECOLOREDLINE("HI WHITE", %HIWHITE)
Next
WaitKey
End Function
'-------------------------------------------------------
Function WRITECOLOREDLINE(TXT As String, CLR As Integer)
Static L As Integer
L = Console_GetCursorY()
Console_WriteLine(TXT)
Console_ColorAt(1, L + 1, 80, L + 2, CLR)
End Function
'-------------------------------------------------------
[/code]
Bookmarks