In the past few months I noticed programs using actual color names in the color statements,
I guess these were added to QB64PE somewhere along the way?
This is great since I can eliminate those color name functions I'd been using!
I googled QB64PE color names and found them documented at
$COLOR:0
$COLOR:32
however there wasn't any example or explanation that to get them to work you have to use the command
e.g., $COLOR:0
Also the entry for Color in the wiki doesn't really mention them or have any examples with them.
$COLOR:0 and $COLOR:32 are in the "see also" list at the bottom, but it's kind of left to the reader to figure that out.
I would suggest adding them to the examples and/or explanation of those pages...
I guess these were added to QB64PE somewhere along the way?
This is great since I can eliminate those color name functions I'd been using!
I googled QB64PE color names and found them documented at
$COLOR:0
$COLOR:32
however there wasn't any example or explanation that to get them to work you have to use the command
e.g., $COLOR:0
Also the entry for Color in the wiki doesn't really mention them or have any examples with them.
$COLOR:0 and $COLOR:32 are in the "see also" list at the bottom, but it's kind of left to the reader to figure that out.
I would suggest adding them to the examples and/or explanation of those pages...
Code: (Select All)
' $COLOR:0 Name Table
' https://qb64phoenix.com/qb64wiki/resources/Color0.html
' compare the built in $COLOR:0 colors
' with the functions I was using as a sanity check
Dim RowNum As Integer
$Color:0
Cls , Black
RowNum = 0
Color cWhiteT&: PrintCol1 "$Color:0 NAMES", RowNum
Color cWhiteT&: PrintCol1 "--------------", RowNum
Color Black, White: PrintCol1 "Black", RowNum
Color Blue, Black: PrintCol1 "Blue", RowNum
Color Green: PrintCol1 "Green", RowNum
Color Cyan: PrintCol1 "Cyan", RowNum
Color Red: PrintCol1 "Red", RowNum
Color Magenta: PrintCol1 "Magenta", RowNum
Color Brown: PrintCol1 "Brown", RowNum
Color White: PrintCol1 "White", RowNum
Color Gray: PrintCol1 "Gray", RowNum
Color LightBlue: PrintCol1 "LightBlue", RowNum
Color LightGreen: PrintCol1 "LightGreen", RowNum
Color LightCyan: PrintCol1 "LightCyan", RowNum
Color LightRed: PrintCol1 "LightRed", RowNum
Color LightMagenta: PrintCol1 "LightMagenta", RowNum
Color Yellow: PrintCol1 "Yellow", RowNum
Color BrightWhite: PrintCol1 "BrightWhite", RowNum
RowNum = 0
Color cWhiteT&: PrintCol2 "MADSCIJR COLORS", RowNum
Color cWhiteT&: PrintCol2 "---------------", RowNum
Color cBlackT&, cWhiteT&: PrintCol2 "cBlackT&", RowNum
Color cBlueT&, cBlackT&: PrintCol2 "cBlueT&", RowNum
Color cGreenT&: PrintCol2 "cGreenT&", RowNum
Color cLtBlueT&: PrintCol2 "cLtBlueT&", RowNum
Color cRedT&: PrintCol2 "cRedT&", RowNum
Color cPurpleT&: PrintCol2 "cPurpleT&", RowNum
Color cOrangeT&: PrintCol2 "cOrangeT&", RowNum
Color cWhiteT&: PrintCol2 "cWhiteT&", RowNum
Color cGrayT&: PrintCol2 "cGrayT&", RowNum
Color cPeriwinkleT&: PrintCol2 "cPeriwinkleT&", RowNum
Color cLtGreenT&: PrintCol2 "cLtGreenT&", RowNum
Color cCyanT&: PrintCol2 "cCyanT&", RowNum
Color cLtRedT&: PrintCol2 "cLtRedT&", RowNum
Color cPinkT&: PrintCol2 "cPinkT&", RowNum
Color cYellowT&: PrintCol2 "cYellowT&", RowNum
Color cLtGrayT&: PrintCol2 "cLtGrayT&", RowNum
PrintCol1 "PRESS ANY KEY TO EXIT", RowNum + 1
Sleep: System
Sub PrintCol1 (MyString$, RowNum%)
RowNum% = RowNum% + 1
Locate RowNum%, 1: Print MyString$;
End Sub
Sub PrintCol2 (MyString$, RowNum%)
RowNum% = RowNum% + 1
Locate RowNum%, 20: Print MyString$;
End Sub
' ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' BEGIN TEXT MODE COLOR CODE FUNCTIONS <- these can be eliminated with $Color:0 !!!
' ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Function cBlackT&
cBlackT& = 0
End Function
Function cBlueT&
cBlueT& = 1
End Function
Function cGreenT&
cGreenT& = 2
End Function
Function cLtBlueT&
cLtBlueT& = 3
End Function
Function cRedT&
cRedT& = 4
End Function
Function cPurpleT&
cPurpleT& = 5
End Function
Function cOrangeT&
cOrangeT& = 6
End Function
Function cWhiteT&
cWhiteT& = 7
End Function
Function cGrayT&
cGrayT& = 8
End Function
Function cPeriwinkleT&
cPeriwinkleT& = 9
End Function
Function cLtGreenT&
cLtGreenT& = 10
End Function
Function cCyanT&
cCyanT& = 11
End Function
Function cLtRedT&
cLtRedT& = 12
End Function
Function cPinkT&
cPinkT& = 13
End Function
Function cYellowT&
cYellowT& = 14
End Function
Function cLtGrayT&
cLtGrayT& = 15
End Function
' ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' END TEXT MODE COLOR CODE FUNCTIONS
' ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++