Color
32-bit Color with alpha channel.
Module | require("yue.gui") |
Type | table |
Color
is represented by a 32-bit ARGB integer.
For APIs that accept Color
, you can also pass a hex string representing
the color, like "#A123"
, "#123"
, "#AA112233"
, "#112233"
.
label:setcolor('#F000')
Class methods
get(name)
Return the color with theme name
.
Parameters
Color::Name
name
Return
Color
rgb(r, g, b)
Create an opaque RGB color.
Parameters
integer
r - 8-bit red channel value.integer
g - 8-bit green channel value.integer
b - 8-bit blue channel value.
Return
Color
argb(a, r, g, b)
Create an ARGB color.
Parameters
integer
ainteger
r - 8-bit red channel value.integer
g - 8-bit green channel value.integer
b - 8-bit blue channel value.
Return
Color