White Hat = never breaks laws - Lawful Good
Gray Hat = Sometimes breaks laws - Neutral good/evil
Black Hat = Doesn't gaf about laws - Chaotic Evil
Can't go from Black/Gray to White as you have broken laws in either case
It is like D&D Alignments