niColorA⚓︎
An object that represents a RGB color with alpha channel support. The values are in [0.0, 1.0] range.
Properties⚓︎
a⚓︎
The alpha value of the color.
Returns:
result(number)
alpha⚓︎
The alpha value of the color.
Returns:
result(number)
b⚓︎
The blue value of the color.
Returns:
result(number)
blue⚓︎
Alias for the blue value of the color.
Returns:
result(number)
g⚓︎
The green value of the color.
Returns:
result(number)
green⚓︎
Alias for the green value of the color.
Returns:
result(number)
r⚓︎
The red value of the color.
Returns:
result(number)
red⚓︎
Alias for the red value of the color.
Returns:
result(number)
Methods⚓︎
copy⚓︎
Creates a copy of the color object.
local result = myObject:copy()
Returns:
result(niColorA)
lerp⚓︎
Calculates the interpolated color between this color and another, given a transition.
local lerpedcolor = myObject:lerp(tocolor, transition)
Parameters:
tocolor(niColorA): The color to interpolate towards.transition(number): The interpolation value. Must be between 0.0 (closer to this color) and 1.0 (closer to the other color).
Returns:
lerpedcolor(niColorA): The calculated value.
Functions⚓︎
new⚓︎
Creates a new niColorA. This function must be given 0, 3, or 4 arguments.
local color = niColorA.new(r, g, b, a)
Parameters:
r(number): Default:0. The red value for the color.g(number): Default:0. The green value for the color.b(number): Default:0. The blue value for the color.a(number): Default:0. The alpha value for the color.
Returns:
color(niColorA)