.forecolor Property

Function:

Specifies current "pen" (drawing) color.

Type:

Word

Value Range:

0-65535. Default = 65535 (&hFFFF).

See Also:

Understanding Controller Properties, Working With Pixels and Colors, lcd.backcolor, lcd.linewidth


Details

Pen color is used when drawing lines (lcd.line, lcd.verline, lcd.horline) and rectangles (lcd.rectangle, lcd.filledrectangle), as well as displaying text (lcd.print, lcd.printaligned).

Property value interpretation depends on the currently selected controller/panel. Selection is made through the Customize Project dialog, accessible through the Project Settings dialog.

This property is of the word type, but only lcd.bitsperpixel lower bits of this value will be relevant. All higher bits will be ignored.

For monochrome and grayscale controllers/panels (lcd.paneltype = 0 — PL_LCD_PANELTYPE_GRAYSCALE), this value will relate to the brightness of the pixel. For color panels/controllers (lcd.paneltype = 1 — PL_LCD_PANELTYPE_COLOR), the value is composed of three fields — one for the red, green, and blue "channels." Check the lcd.redbits, lcd.greenbits, and lcd.bluebits properties to see how the fields are combined into the color word.


.forecolor Property

Details