No, hats are banned mainly to discourage kids from glamorizing gangs & thug culture on school grounds. The colors & designs of different hats would also be a distraction in a classroom. This is why some schools have dress codes, to prevent distractions.