---
name: "BIS_fnc_HEXtoRGB"
type: function
status: ok
groups: ["Math"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_HEXtoRGB
revid: 378164
updated: 2026-03-02T12:35:10Z
---

# BIS_fnc_HEXtoRGB

*Function · Math · Arma 3 v1.00*

## Description

Convert RGBA hexcode color into RGBA array format.

## Syntax

```sqf
[hexString] call BIS_fnc_HEXtoRGB
```

**Parameters:**

- `hexString`: [String](../topics/String.md) - string representing **4 bytes** of HEX color

**Returns:** [Array](../topics/Array.md) format [Color (RGBA)](../topics/Color.md) - array of **4** numbers in range 0..1

## Examples

### Example 1

```sqf
["025D00FF"] call BIS_fnc_HEXtoRGB; // [0.007843, 0.843138, 0, 1]
```

### Example 2

Usually HEX code is represented as 3 bytes without alpha, so you can add it yourself:

```sqf
_hexstring = "025D00";
[_hexString + "FF"] call BIS_fnc_HEXtoRGB; // add alpha 4th byte
```

## See also

[Color](../topics/Color.md) · [BIS_fnc_colorConfigToRGBA](../functions/BIS_fnc_colorConfigToRGBA.md) · [BIS_fnc_colorRGBAtoHTML](../functions/BIS_fnc_colorRGBAtoHTML.md) · [BIS_fnc_colorRGBtoHTML](../functions/BIS_fnc_colorRGBtoHTML.md) · [BIS_fnc_colorRGBAtoTexture](../functions/BIS_fnc_colorRGBAtoTexture.md)

<sub>Source: [BI Community Wiki — BIS fnc HEXtoRGB](https://community.bistudio.com/wiki/BIS_fnc_HEXtoRGB) (revision 378164).</sub>
