//SETTEXTCOLOR, r, g, b
SETTEXTCOLOR sets the color to be used for subsequent text output.
The r (red), g (green), b (blue) values may each range from 0-255. You can use these to specify virtually any color, regardless of whether your printer actually supports it. Some common color values are shown below. "
R,G,B |
Color |
|
R,G,B |
Color |
0,0,0 |
Black |
|
192,192,192 |
Gray |
255,255,255 |
White |
|
255,0,255 |
Magenta (intense) |
255,0,0 |
Red (intense) |
|
183,231,58 |
Lime green |
Comments
To figure out the values for special colors, you can use the Settings | Colors dialog in A-Shell. Click on a color, then select the Define Custom Color button and you will see a dialog which allows you to select any color from a three-dimensional grid. The third dimension is a slide bar on the right side that controls lightness and darkness. As you move the color cursor around, you will see the color values changing. Don't confuse them with the Hue, Saturation, and Luminescence values, which are part of an alternative system of defining colors.
Note that when one color (e.g. text) is written on top of another, the effect is not additive. Rather, the last written color replaces the underlying one(s). So for example, you can write white text on top of a dark background—e.g., image, solid rectangle, etc.—by outputting the background first, then the text. The following set of directives illustrates this by outputting two white text strings inside a black circle.
//;Print multiple independent white strings in one black circle
//SETMAPMODE,LOENGLISH
//ELLIPSE,100,100,200,200,BLACK_BRUSH
//SETTEXTCOLOR,255,255,255
//SETFONT,200,ARIAL,DEFAULT_PITCH,ANSI_CHARSET,FW_LIGHT
//TEXTCENTER,100,120,200,135,"US"
//SETFONT,320,ARIAL,DEFAULT_PITCH,ANSI_CHARSET,FW_HEAVY
//TEXTCENTER,100,145,200,175,"9.5"