Color
List of all possible functions to manipulate colors.
Colors are implemented in Lua thus type(color) == "table" and TypeID(color) == TYPE_TABLE.
For type checking use IsColor.
Created by Color, HSVToColor, and HSLToColor.
Type | Name | Description |
---|---|---|
number | r | The red component of the color. |
number | g | The green component of the color. |
number | b | The blue component of the color. |
number | a | The alpha component of the color. |
Methods
Performs linear interpolation between this and given colors.
Sets the red, green, blue, and alpha of the color.
Converts a Color into HSL color space. This calls ColorToHSL internally.
Encodes a RGB Color into the HSV color space.
This function uses ColorToHSV internally.
Translates the Color into a Vector, losing the alpha channel.
This will also range the values from 0 - 255 to 0 - 1
r / 255 -> x
g / 255 -> y
b / 255 -> z
This is the opposite of Vector:ToColor