but I suspect it's only done when you do damage to it.
Not quite technically true. The general rule you can apply is, would the action claim a mob to me? If a mob is yellow waltzing around, anything you could do that would claim it and make it start attacking you works. Mug. Steal. Melee attack. Ranged attack. Casting Spells. Voke. Whatever. Doesnt have to actually be damage.
Trick attacking a yellow mob onto someone else will claim it red, but only red on YOU. It may beat up the other guy, but if you disengaged, it would go back to yellow because they TA buddy never actually claimed it. Think of it more like how people used to Bind a mob and it would attack the nearest person, even people with no hate (was an MPK tool :P) Those guys dont claim the mob and therefore dont stick TH on it even if they are getting attacked.
Aanalaty, Mithra of San d'Oria
99Thf/99Drg/99Rng/95Pld/Secret Job 92
Maat-1/1 Thf Meleed (pansies steal)
Some of mah gearz: http://www.ffxiah.com/player/Lakshmi/Aanalaty#item-sets
Join 'People Against The Heart Snatcher' and help put Thfs on the right P.A.T.H.S.