You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Graphics Library > setColorRGB

9.13 setColorRGB

gc:setColorRGB(red, green, blue) 
gc:setColorRGB(0xRRGGBB) -- API Level > '1.0'

Sets the color for subsequent draw and fill routines. The red, green, and blue components of the color are values in the range of 0 to 255. Black is 0,0,0 and white is 255,255,255. Alternately, a single value can be passed in. The components of this single value are blue + 255 * (green + 255
* red).

Introduced in platform.apiLevel = '1.0'

Extended in platform.apiLevel = ‘2.0’