ColorValue

From GiderosMobile

Available since: Gideros 2024.11
Class: (global)

Description

This function sets a Color its r,g,b,a channel values.

r,g,b,a = ColorValue(r,g,b,a)

Parameters

r: (number) the red channel value between 0 and 1
g: (number) the green channel value between 0 and 1
b: (number) the blue channel value between 0 and 1
a: (number) the alpha channel value between 0 and 1 Optional default = 1

Return values

Returns (number) color red channel between 0 and 1
Returns (number) color green channel between 0 and 1
Returns (number) color blue channel between 0 and 1
Returns (number) color alpha channel between 0 and 1

Example

textfield:setTextColor(ColorValue(1, 0, 1, 1)) -- Gideros 2024.11+
print(ColorValue(1, 0, 1, 1)) -- 1, 0, 1, 1