During my very brief stint as a security guard at a casino I ran into that last part way more than I ever would have expected. It is astounding how many people do not understand that the laws from their home country do not apply in the country they are visiting.
It is now state personnel policy that, for the purposes of visibility, hair can be counted as visibility headwear so long as it is the correct color of bright orange.
I dyed my hair traffic cone orange one summer and asked if I still had to wear my hat. My boss was amused and asked his boss. His boss was also amused and asked his boss. On and on and on until a memo was issued signed by the director of the entire agency saying that no, anyone with traffic cone orange hair did not have to wear a hat.