Just a color.
| Color values are constructed by the global function color(): | |
| color | (r: int, g: int, b: int [, opacity: int | float]) : color
The color function constructs color value from red, green, blue and opacity components. |
| Constants | |
| N/A | |
| Properties | |
| r | read-only, integer 0..255, red channel. |
| g | read-only, integer 0..255, green channel. |
| b | read-only, integer 0..255, blue channel. |
| a | read-only, integer 0..255, alpha value. |
| opacity | read-only, float 0.0 .. 1.0, that is alpha value expressed as a float. |
| Methods | |
| rgba |
(r: int, g: int, b: int [, opacity: int | float]) : color Static method (of the class), constructs color value from red, green, blue and opacity components. |
| hsv |
(hue: float, saturation: float, value: float [, opacity: int | float]) : color Static method (of the class), constructs the color from HSV values, see: http://en.wikipedia.org/wiki/HSL_color_space |
| hsl |
(hue: float, saturation: float, lightness: float [, opacity: int | float]) : color Static method (of the class), constructs the color from HSL values, see: http://en.wikipedia.org/wiki/HSL_color_space |
| parse |
( text: string ) Static method (of the class), parses the string and constructs the color value. Supported formats:
|
| toString |
( [#RGB | #rgb | #rgba] ) : string Returns string representation of the color value according to the format provided by the symbol defining one of formats:
|
| toInteger |
( ) : int Converts the color to 32bit integer. |
| toHSV |
( ) : array[3] of floats Returns array[3] of floats with HSV components. |
| toHSL |
( ) : array[3] of floats Returns array[3] of floats with HSL components. |