{"name":"setMarkerColor","title":"setMarkerColor","type":"command","url":"https://community.bistudio.com/wiki/setMarkerColor","revid":370055,"updated":"2024-10-29T12:42:44Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","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.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> 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).","syntaxes":[{"syntax":"markerName setMarkerColor colour","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"colour","type":"String","description":"String\n\n- `CfgMarkerColors`'s class name\n- Arma 3 v2.20 direct colour definition in one of the following formats (values in range 0..1):\n  - \"#(r,g,b)\" (e.g `\"#(1,0,1)\"`, `#FF00FF` equivalent)\n  - \"#(r,g,b,a)\" (e.g `\"#(0.678,0.749,0.514,0.5)\"`, `#ADBF8380` equivalent). Alpha 'a' in this format is independent of markerAlpha","type_expr":"String","text":"colour: String\n\n- `CfgMarkerColors`'s class name\n- Arma 3 v2.20 direct colour definition in one of the following formats (values in range 0..1):\n  - \"#(r,g,b)\" (e.g `\"#(1,0,1)\"`, `#FF00FF` equivalent)\n  - \"#(r,g,b,a)\" (e.g `\"#(0.678,0.749,0.514,0.5)\"`, `#ADBF8380` equivalent). Alpha 'a' in this format is independent of markerAlpha"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"colour"}}],"examples":[{"code":["\"MarkerOne\" setMarkerColor \"ColorBlack\";"]},{"code":["\"MarkerOne\" setMarkerColor \"#(1,0,0,1)\"; // red color - since Arma 3 v2.20"]}],"see_also":["setMarkerColorLocal","markerColor","getMarkerColor","setMarkerBrush","createMarker","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerText","setMarkerType","setMarkerAlpha"]}