SetUnitColor

Parameters
whichUnit unit

Unit to modify.

whichColor playercolor

Set to this player's color.

comment

Sets a unit's player color accent (tinting).

note

If the unit has a special effect attached, the new tinting is applied to the effect's model too.

bug

Visual bug (tested v1.32.10): if you create two units of the same type (Normal and Colored) and set Colored's color to a different color, then clicking between the two units will not change the portrait color. The portrait will only update correctly if you deselect the unit.

patch

1.00

Source
common.j
return type
nothing
Source code
native          SetUnitColor        takes unit whichUnit, playercolor whichColor returns nothing