This shows you the differences between two versions of the page.
colored_20text_20in_20the_20mainwin [2018/03/31 13:19] 127.0.0.1 external edit |
colored_20text_20in_20the_20mainwin [2018/04/17 15:19] (current) tbest3112 Added syntax highlighting |
||
---|---|---|---|
Line 2: | Line 2: | ||
//by Richard Russell, May 2013//\\ \\ Liberty BASIC can only display black text on a white background in the **mainwin**. [[http://lbbooster.com/|LB Booster]], however, allows both the text and background colors to be changed. For example:\\ | //by Richard Russell, May 2013//\\ \\ Liberty BASIC can only display black text on a white background in the **mainwin**. [[http://lbbooster.com/|LB Booster]], however, allows both the text and background colors to be changed. For example:\\ | ||
+ | <code lb> | ||
!COLOR 15 | !COLOR 15 | ||
!COLOR 129 | !COLOR 129 | ||
print "White text on a red background" | print "White text on a red background" | ||
+ | </code> | ||
Note that COLOR (or COLOUR) must be in capitals.\\ \\ The color numbers which may be used are as follows:\\ | Note that COLOR (or COLOUR) must be in capitals.\\ \\ The color numbers which may be used are as follows:\\ | ||
Line 25: | Line 27: | ||
| White\\ | 15\\ | 143\\ | | | White\\ | 15\\ | 143\\ | | ||
\\ If this selection of colors is not sufficient it is possible to redefine any of them to a specific RGB value, for example:\\ | \\ If this selection of colors is not sufficient it is possible to redefine any of them to a specific RGB value, for example:\\ | ||
+ | <code lb> | ||
!COLOR 1,200,200,255 | !COLOR 1,200,200,255 | ||
!COLOR 129 | !COLOR 129 | ||
print "Black text on a pale blue background" | print "Black text on a pale blue background" | ||
+ | </code> | ||
Here color 1 (which is normally red) is redefined to be a pale blue, and then set as the background color. | Here color 1 (which is normally red) is redefined to be a pale blue, and then set as the background color. |