Color
Topic · Markdown · JSON · original wiki page
Color is a format of an Array,
namely an Array of Numbers in format [r, g, b] or [r, g, b, a], values ranging from 0 to 1.
- r is the intensity of red,
- g is the intensity of green,
- b is the intensity of blue
- a, if present, is alpha (opacity). An alpha value of 0 means totally transparent and a value of 1 means totally opaque.
Note
In config, the color array respects the RGBA format, only it is encapsulated by curly braces:
myColor[] = { 1, 1, 1, 1 };
Examples
| Colour | SQF Array | HTML | Render |
|---|---|---|---|
| Mauve purple | [0.3, 0.3, 0.5, 1] |
#4D4D80 |
|
| White | [1, 1, 1, 1] |
#FFFFFF |
|
| Camo green | [0, 0.2, 0, 1] |
#003300 |
|
| Rust orange | [0.73, 0.24, 011, 1] |
#BA3D1C |