lcd.RGB

Returns colorFlag in RGB565 format that can be used with lcd draw functions.

Syntax

lcd.RGB( r, g, b | rgb )

Parameters

NameReqTypeDescription

r

integer

number between 0 (0x00) and 255 (0xFF) that expresses te amount of red in the color

g

interer

number between (0x00) and 255 (0xFF) that expresses te amount of green in the color

b

integer

number between (0x00) and 255 (0xFF)that expresses te amount of blue in the color

or

NameReqTypeDescription

rgb

integer

number between 0 (0x00) and 16777215 (0xFFFFFF) that expresses the RGB value (0xFF0000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE)

Returns

Notes

Available on

API status

EdgeTX versionAction

2.3.0

Introduced

Examples

-- RGB numeric parameters
local darkred = lcd.RGB(20,0,0)  -- create color_flag for color
lcd.drawText(0,0,"Very dark red text", darkred)