Color

From LoTROInterface Wiki

(Difference between revisions)
Jump to: navigation, search
Line 15: Line 15:
{| {{API_Header}}
{| {{API_Header}}
-
{{API_Row|[[Color()]]|Initializes a new color. }}
+
{{API_Row|[[Color|Color()]]|Initializes a new color. }}
-
{{API_Row|[[Color(r, g, b)]]|Initializes a new color from r, g, b components. }}
+
{{API_Row|[[Color~1|Color(r, g, b)]]|Initializes a new color from r, g, b components. }}
-
{{API_Row|[[Color(a, r, g, b)]]|Initializes a new color from a, r, g, b components. }}
+
{{API_Row|[[Color~2|Color(a, r, g, b)]]|Initializes a new color from a, r, g, b components. }}
|}
|}

Revision as of 11:07, 24 September 2010


Represents a 4 channel color with red, green, blue, and alpha.


Constructors

Name Description
Color Initializes a new color.


Overloads

Name Description
Color() Initializes a new color.
Color(r, g, b) Initializes a new color from r, g, b components.
Color(a, r, g, b) Initializes a new color from a, r, g, b components.


Fields

Name Description
A The alpha component.
B The blue component.
G The green component.
R The red component.


Remarks

A simple color class with the following fields directly accessible in lua script: R, G, B, and A. The color components are number values in the range of 0.0 to 1.0.The red component.The green component.The blue component.The alpha component.


Examples

This example demonstrates the Color class.


Demonstrates a Color
newColor = Turbine.UI.Color();
newColor.R = 1.0;
newColor.G = 1.0;
newColor.B = 0.0;
newColor.A = 1.0;

blue = Turbine.UI.Color( 0, 0, 1 );

-- Pass the colors to any control to set their colors.


Inheritence Hierarchy

Turbine.Object

Turbine.UI.Color
Personal tools