Library Color
Colour helper functions.
Functions
| fromHSV( h, s, v, a ) | Creates a colour object from the given HSV values |
| fromHex( hex, alpha ) | Creates a colour from a single hexadecimal value, either a string or a number. |
Functions
- Color.fromHSV( h, s, v, a )
-
Creates a colour object from the given HSV values
Environment:
SharedParameters:
-
h: Hue, 0 - 1 -
s: Saturation, 0 - 1 -
v: Value, 0 - 1 -
a: (Optional) Alpha value, defaults to 255.
Return value:
(Color)A new colour table with values converted into RGB from HSV. -
- Color.fromHex( hex, alpha )
-
Creates a colour from a single hexadecimal value, either a string or a number.
Environment:
SharedParameters:
-
hex: Either a string of the form "#FFFFFF", or a number of the form 0xFFFFFF -
alpha: (Optional) Alpha value, defaults to 255.
Return value:
(Color)A new colour table matching the hex value. -