One of the many vestiges of slavery and racism is that anyone with black blood is considered black.
The "black" guy in Plessy v. Ferguson was actually so light-skinned that he looked more white than anything, but he had black blood, was considered black under the law, and was discrimninated against on the basis of race.