Actually, that is false. It isn't the race, gender, sexual orientation, religion, etc., of the attacker and victim that determine if it is a hate crime. What makes it a hate crime is if you pick the victim based on their race, gender, religion, etc. If a white person sets out to beat up a random white person because he hates white people, that is a hate crime. On the other hand, if a white person sets out to beat up a random person, and the first person he comes across is black, and he beats him up, that is not a hate crime.
There actually are quite a few cases of people being convicted of hate crimes against people on the basis of a demographic characteristic they share. Gay people who have complexes about their own sexuality that take that out on other gay people by beating them up for being gay, for example, are convicted of hate crimes.