---
name: "Color"
type: topic
source: https://community.bistudio.com/wiki/Color
revid: 376825
updated: 2025-11-22T11:46:47Z
---

# Color

Color is a format of an [Array](../topics/Array.md),
namely an [Array](../topics/Array.md) of [Number](../topics/Number.md)s in format `[r, g, b]` or `[r, g, b, a]`, values ranging from 0 to 1.

- **r** is the intensity of **r**ed,
- **g** is the intensity of **g**reen,
- **b** is the intensity of **b**lue
- **a**, if present, is **a**lpha (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:
>
> ```cpp
> myColor[] = { 1, 1, 1, 1 };
> ```

### Examples

| Colour | [SQF](../topics/SQF_Syntax.md) Array | HTML | Render |
|---|---|---|---|
| Mauve purple | ```sqf<br>[0.3, 0.3, 0.5, 1]<br>``` | ```html<br>#4D4D80<br>``` |  |
| White | ```sqf<br>[1, 1, 1, 1]<br>``` | ```html<br>#FFFFFF<br>``` |  |
| Camo green | ```sqf<br>[0, 0.2, 0, 1]<br>``` | ```html<br>#003300<br>``` |  |
| Rust orange | ```sqf<br>[0.73, 0.24, 011, 1]<br>``` | ```html<br>#BA3D1C<br>``` |  |

<sub>Source: [BI Community Wiki — Color](https://community.bistudio.com/wiki/Color) (revision 376825).</sub>
