CreateColor
From Spheriki
Creates a new Sphere Color object, representing a visual color.
Contents |
[edit]
Usage
Color CreateColor(red, green, blue [, alpha]);
- red Red color value (0-255).
- green Green color value (0-255).
- blue Blue color value (0-255).
- alpha Alpha transparency value (0-255). The lower the value, the more transparent the color will be. If not specified, the default value will be 255 (fully opaque).
[edit]
Examples
var DarkBlue = CreateColor(0, 0, 150);
Creates a dark blue color.
SetColorMask(CreateColor(255, 255, 255, 100));
Sets the colour mask to a new, fully white semitransparent color.
[edit]
Notes
You should create global variables for colors that you use often, to save time creating new colors.
[edit]
See also
- Sphere Color object
- Color masking

