- The color is represented by a number, an RGB value (one byte per primary color).
- A RGB color can be represented as an hexadecimal number : 0xRRGGBB , RR meaning a 8bit hexadecimal red value, and so on.
Label.bgcolor read/write property
Get or set the Label background color (if not set, nil
is returned, meaning the Label uses the parent widget background color).
Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("Label.bgcolor sample")
local label = ui.Label(win, "Hello World !")
label.fontsize = 32
label.bgcolor = 0x4060A0
label.fgcolor = 0xF0A030
label:center()
win:show()
-- update user interface
repeat
ui.update()
until not win.visible