---
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: 319139
updated: 2022-05-13T09:23:14Z
---

# 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)

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