---
name: "lbSetColor"
type: command
status: ok
groups: ["GUI Control - ListBox"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/lbSetColor
revid: 379436
updated: 2026-10-31T00:06:16Z
---

# lbSetColor

*Command · GUI Control - ListBox · Arma 3 v0.50 · introduced in Operation Flashpoint v1.75*

Locality: arguments **local** · effect **local**

## Description

Sets the color of the item (left) with the given index of the listbox or combobox with id idc of the topmost user Dialog to color.

## Syntax

### Syntax 1

```sqf
lbSetColor [idc, index, color]
```

**Parameters:**

- `idc`: [Number](../topics/Number.md) - control's IDC
- `index`: [Number](../topics/Number.md)
- `color`: [Color (RGBA)](../topics/Color.md)

**Returns:** [Nothing](../topics/Nothing.md)

### Syntax 2

```sqf
control lbSetColor [index, color]
```

**Parameters:**

- `control`: [Control](../topics/Control.md)
- `index`: [Number](../topics/Number.md)
- `color`: [Color (RGBA)](../topics/Color.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
lbSetColor [101, 0, [0, 1, 0, 0.5]];
```

### Example 2

```sqf
_control lbSetColor [0, [0, 1, 0, 0.5]];
```

## See also

[lbColor](../commands/lbColor.md) · [lbSetColorRight](../commands/lbSetColorRight.md) · [lbColorRight](../commands/lbColorRight.md)

## Community notes

**ffur2007slx2_5** — 2014-09-10

More information on the [CT_LISTBOX](../topics/CT_LISTBOX.md) command family can be found [here](../topics/CT_LISTBOX.md#scripting-example).

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