Label.fgcolor read/write property


Get or set the Label foreground color.

  • 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.

Example

local ui = require "ui" -- create a simple Window local win = ui.Window("Label.fgcolor 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