If the forward is running and will easily run by the defender- red. If the forward is stationary (either with his back to goal or facing the defender but not moving)- yellow.

In the first case, the attacker would be in on a sure break a way, and the defender prevented that by an intentional illegal play (just like a foul from behind on a break a way). In the second instance, there is no way to tell if the attacker could out race the defender to the ball, b/c they would both be starting from a stationary position. Also, in this case, the goalkeeper would probably get the ball even if he is planted on his line. However, it is an intentional hand ball. I am not sure exactly what the rules say but this just seems like the way it should be.