lcd.RGB

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

Syntax

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

Parameters

Name
Req
Type
Description

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

Name
Req
Type
Description

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 version
Action

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)