{"name":"setMarkerColor","operator":null,"title":"setMarkerColor","type":"command","url":"https://community.bistudio.com/wiki/setMarkerColor","revid":370055,"updated":"2024-10-29T12:42:44Z","groups":["Markers"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.21"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.21"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":"global","server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"markerName","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"markerName: String"},{"name":"colour","type":"String","optional":false,"default":null,"description":"String\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)\"`, `1. FF00FF` equivalent)\n  - \"#(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","types":["String"],"since":null,"text":"colour: String\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)\"`, `1. FF00FF` equivalent)\n  - \"#(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"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"markerName","types":["String"]},"right":{"text":"colour","types":["String"]}}],"examples":[{"text":"```sqf\n\"MarkerOne\" setMarkerColor \"ColorBlack\";\n```","code":["\"MarkerOne\" setMarkerColor \"ColorBlack\";"]},{"text":"```sqf\n\"MarkerOne\" setMarkerColor \"#(1,0,0,1)\"; // red color - since Arma 3 v2.20\n```","code":["\"MarkerOne\" setMarkerColor \"#(1,0,0,1)\"; // red color - since Arma 3 v2.20"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setMarkerColorLocal","markerColor","getMarkerColor","setMarkerBrush","createMarker","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerText","setMarkerType","setMarkerAlpha"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Markers","Introduced with Operation Flashpoint version 1.21","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}