---
name: "setMarkerColor"
type: command
status: ok
groups: ["Markers"]
arma3_since: "0.50"
locality: {"argument": null, "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setMarkerColor
revid: 370055
updated: 2024-10-29T12:42:44Z
---

# setMarkerColor

*Command · Markers · Arma 3 v0.50 · introduced in Operation Flashpoint v1.21*

Locality: effect **global**

## Description

Set marker's colour. Arma 3's marker colour names and their corresponding RGBA values can be found here: Arma 3: CfgMarkerColors.

> [!NOTE]
> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.
> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).

## Syntax

```sqf
markerName setMarkerColor colour
```

**Parameters:**

- `markerName`: [String](../topics/String.md)
- `colour`: [String](../topics/String.md)
  - `CfgMarkerColors`'s class name
  - Arma 3 v2.20 direct colour definition in one of the following formats (values in range 0..1):
    - "#(r,g,b)" (e.g `"#(1,0,1)"`, `1. FF00FF` equivalent)
    - "#(r,g,b,a)" (e.g `"#(0.678,0.749,0.514,0.5)"`, `1. ADBF8380` equivalent). Alpha 'a' in this format is independent of [markerAlpha](../commands/markerAlpha.md)

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

## Examples

### Example 1

```sqf
"MarkerOne" setMarkerColor "ColorBlack";
```

### Example 2

```sqf
"MarkerOne" setMarkerColor "#(1,0,0,1)"; // red color - since Arma 3 v2.20
```

## See also

[setMarkerColorLocal](../commands/setMarkerColorLocal.md) · [markerColor](../commands/markerColor.md) · [getMarkerColor](../commands/getMarkerColor.md) · [setMarkerBrush](../commands/setMarkerBrush.md) · [createMarker](../commands/createMarker.md) · [setMarkerDir](../commands/setMarkerDir.md) · [setMarkerPos](../commands/setMarkerPos.md) · [setMarkerShape](../commands/setMarkerShape.md) · [setMarkerSize](../commands/setMarkerSize.md) · [setMarkerText](../commands/setMarkerText.md) · [setMarkerType](../commands/setMarkerType.md) · [setMarkerAlpha](../commands/setMarkerAlpha.md)

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