Type: Color
The Color type represents an RGB color that can be used by various nodes. The colors are defined in the sRGB Color Space. Colors without alpha
defined will have an implicit alpha
value of 255.
Constructors
Arguments | |
---|---|
Color(hex)
|
String hex - A string representing a color in hexadecimal.
|
Color(r, g, b)
|
Number r - Amount of red in the color between 0 and 255.
Number Number |
Color(r, g, b, a)
|
Number r - Amount of red in the color between 0 and 255.
Number Number Number |
FloatColor(r, g, b)
|
Number r - Amount of red in the color between 0.0 and 1.0.
Number Number |
FloatColor(r, g, b, a)
|
Number r - Amount of red in the color between 0.0 and 1.0.
Number Number Number |
HSBColor(h, s, b)
|
Number h - Hue angle of the color. This can be any floating-point number. The floor of this number is subtracted from it to create a fraction between 0.0 and 1.0. This fractional number is then multiplied by 360 to produce the hue angle in the HSB color model.
Number Number |
HSBColor(h, s, b, a)
|
Number h - Hue angle of the color. This can be any floating-point number. The floor of this number is subtracted from it to create a fraction between 0.0 and 1.0. This fractional number is then multiplied by 360 to produce the hue angle in the HSB color model.
Number Number Number |
Parameters
Type | Details | |
---|---|---|
alpha
|
Number | Note: The parameter is read-only. The alpha channel of the color between 0 and 255. |
blue
|
Number | Note: The parameter is read-only. The blue channel of the color between 0 and 255. |
green
|
Number | Note: The parameter is read-only. The green channel of the color between 0 and 255. |
red
|
Number | Note: The parameter is read-only. The red channel of the color between 0 and 255. |
Functions
Arguments | Returns | Details | |
---|---|---|---|
brighter()
|
Color | Creates a new Color that is a brighter version of this Color. This method applies an arbitrary scale factor to each of the three RGB components of this Color to create a brighter version of this Color. The alpha value is preserved. Although brighter() and darker() are inverse operations, the results of a series of invocations of these two methods might be inconsistent because of rounding errors.
| |
darker()
|
Color | Creates a new Color that is a darker version of this Color. This method applies an arbitrary scale factor to each of the three RGB components of this Color to create a darker version of this Color. The alpha value is preserved. Although brighter() and darker() are inverse operations, the results of a series of invocations of these two methods might be inconsistent because of rounding errors.
| |
equals(c)
|
Color c - A color against which to compare equality.
|
Boolean | Compares two colors to determine if they represent the exact same color, including alpha. |
Types | |
---|---|
Primitives | Boolean · Number · String |
Objects | Color · Dimension · DmxMultiverse · DmxUniverse · LocalInterface · Material · Point · RemoteAddress/IP · Scene · Time · Touch |
Node Specific | NdiSource · WoControlCue · WoHitTestResult · WoTimeline |
Collections | List · List of Lists · Map · Varargs |
Special | Any · Consumer · Expression · Null · Void |