SetGroupID sets the name of the group (ex. Alpha Black, Charlie Red, Yankee, Zulu, etc...). The command goes like this:
unit SetGroupID ["Name","Color"]
It can be entered anywhere a command can, init field, trigger, script, etc...
The names and colors are defined in the CfgWorlds section of the config.bin and additional ones can be added in addons. Colors don't necessarily have to be colors either, they can be names too, but all of the default ones are colors (except for one). The default ones are:
Names:
Alpha
Bravo
Charlie
Delta
Echo
Foxtrot
Golf
Hotel
November
Kilo
Yankee
Zulu
Colors:
GroupColor0 - Nothing (so the group ID will be just the name)
GroupColor1 - Black
GroupColor2 - Red
GroupColor3 - Green
GroupColor4 - Blue
GroupColor5 - Yellow
GroupColor6 - Orange
GroupColor7 - Pink
Six - Just "Six"