Type Color
Colours in RGB space. This is a direct binding to the GLua colour type.
Methods
| SetUnpacked( r, g, b, a ) | Sets the RGBA components of the colour. |
| ToHSL() | Returns the colour in HSL space. |
| ToHSV() | Returns the colour in HSV space. |
| ToNormalizedHSV() | Returns the colour in HSV space, normalising the hue to between 0 and 1. |
| ToTable() | Returns the colour as an (r, g, b, a) array. |
| ToVector() | Returns the RGB values as a Vector, with each component normalised to be between 0 and 1. |
| Unpack() | Returns the components of the colour. |
Methods
- Color:SetUnpacked( r, g, b, a )
-
Sets the RGBA components of the colour.
Environment:
SharedParameters:
-
r: The red value to set. -
g: The green value to set. -
b: The blue value to set. -
a: The alpha value to set.
-
- Color:ToHSL()
-
Returns the colour in HSL space.
Environment:
SharedReturn values:
-
(number)The hue of the colour in degrees between 0 and 360. -
(number)The saturation of the colour between 0 and 1. -
(number)The lightness of the colour between 0 and 1.
-
- Color:ToHSV()
-
Returns the colour in HSV space.
Environment:
SharedReturn values:
-
(number)The hue of the colour in degrees between 0 and 360. -
(number)The saturation of the colour between 0 and 1. -
(number)The value of the colour between 0 and 1.
-
- Color:ToNormalizedHSV()
-
Returns the colour in HSV space, normalising the hue to between 0 and 1.
Environment:
SharedReturn values:
-
(number)The hue of the colour between 0 and 1. -
(number)The saturation of the colour between 0 and 1. -
(number)The value of the colour between 0 and 1.
-
- Color:ToTable()
-
Returns the colour as an (r, g, b, a) array.
Environment:
Shared - Color:ToVector()
-
Returns the RGB values as a Vector, with each component normalised to be between 0 and 1.
Environment:
Shared - Color:Unpack()
-
Returns the components of the colour.
Environment:
SharedReturn values:
-
(number)The red value. -
(number)The green value. -
(number)The blue value. -
(number)The alpha value.
-