{"name":"Color","title":"Color","type":"topic","url":"https://community.bistudio.com/wiki/Color","revid":376825,"updated":"2025-11-22T11:46:47Z","aliases":[],"markdown":"Color is a format of an Array,\nnamely an Array of Numbers in format `[r, g, b]` or `[r, g, b, a]`, values ranging from 0 to 1.\n\n- **r** is the intensity of **r**ed,\n- **g** is the intensity of **g**reen,\n- **b** is the intensity of **b**lue\n- **a**, if present, is **a**lpha (opacity). An alpha value of 0 means totally transparent and a value of 1 means totally opaque.\n\n> [!NOTE]\n> In config, the color array respects the RGBA format, only it is encapsulated by curly braces:\n>\n> ```cpp\n> myColor[] = { 1, 1, 1, 1 };\n> ```\n\n### Examples\n\n| Colour | SQF Array | HTML | Render |\n|---|---|---|---|\n| Mauve purple | ```sqf<br>[0.3, 0.3, 0.5, 1]<br>``` | ```html<br>#4D4D80<br>``` |  |\n| White | ```sqf<br>[1, 1, 1, 1]<br>``` | ```html<br>#FFFFFF<br>``` |  |\n| Camo green | ```sqf<br>[0, 0.2, 0, 1]<br>``` | ```html<br>#003300<br>``` |  |\n| Rust orange | ```sqf<br>[0.73, 0.24, 011, 1]<br>``` | ```html<br>#BA3D1C<br>``` |  |","sections":[{"heading":null,"level":1,"markdown":"Color is a format of an Array,\nnamely an Array of Numbers in format `[r, g, b]` or `[r, g, b, a]`, values ranging from 0 to 1.\n\n- **r** is the intensity of **r**ed,\n- **g** is the intensity of **g**reen,\n- **b** is the intensity of **b**lue\n- **a**, if present, is **a**lpha (opacity). An alpha value of 0 means totally transparent and a value of 1 means totally opaque.\n\n> [!NOTE]\n> In config, the color array respects the RGBA format, only it is encapsulated by curly braces:\n>\n> ```cpp\n> myColor[] = { 1, 1, 1, 1 };\n> ```"},{"heading":"Examples","level":3,"markdown":"| Colour | SQF Array | HTML | Render |\n|---|---|---|---|\n| Mauve purple | ```sqf<br>[0.3, 0.3, 0.5, 1]<br>``` | ```html<br>#4D4D80<br>``` |  |\n| White | ```sqf<br>[1, 1, 1, 1]<br>``` | ```html<br>#FFFFFF<br>``` |  |\n| Camo green | ```sqf<br>[0, 0.2, 0, 1]<br>``` | ```html<br>#003300<br>``` |  |\n| Rust orange | ```sqf<br>[0.73, 0.24, 011, 1]<br>``` | ```html<br>#BA3D1C<br>``` |  |"}],"categories":["Arrays"],"groups":["Scripting"]}