.Greenbits R/O Property

Top  Previous  Next

Function:

A 16-bit value packing two 8-bit parameters: number of "green" bits per pixel (high byte) and the position of the least significant green bit within the color word (low byte).

Type:

Word

Value Range:

Value depends on the currently selected controller/panel.

See Also:

Understanding Controller Properties, Working With Pixels and Colors

 


Details

The value of this property depends on the currently selected controller/panel. Selection is made through the Customize Platform dialog, accessible through the Project Settings dialog. This property is only relevant for color panels (lcd.paneltype= 1- PL_LCD_PANELTYPE_COLOR).

By taking the value of the high byte you can determine the number of the steps in which the brightness of the green "channel" can be adjusted. For example, if the high byte is equal to 5, then there are 32 levels for green.

This property also tells you the bit position and length of the green field in values used by lcd.forecolor, lcd.backcolor, and lcd.setpixel. If, for example, the lcd.redbits=&h0500, lcd.bluebits=&h0605, and lcd.greenbits=&h050B, then you can reconstruct the composition of the red, green, and blue bits in a word: bit 15 -> gggggbbbbbbrrrrr <- bit 0. In this example, the green field is the last field and occupies 5 bits (15-11).