Roots are in old-school film. The villain was often dressed in black, whereas the hero was often dressed in white. The "hats" reference carried over to the hacking community with the same meanings. A white hat hacker is someone who, with permission, finds flaws in security without personal gain. A black hat hacker finds flaws for personal gain. The first faggot that replied to you mentions gray hats. These are hackers who - as gray implies - are a combination of the two. They're not exploiting flaws for personal gain, buuuuut how they go about things isn't exactly legal. This would be a hacker who, say, breaks into a government system just for a challenge, but never had any intention of selling information. So... convert black hats (villains) into red hats (align with Trump's party) to serve the white hats (patriots).