I think appearance is like speech. We have different registers based on the expectations of the place / people and our own desire to portray certain meanings, whether those meanings are 'professional', 'relaxed', 'approachable', 'party animal', 'funny', 'fun to be around' or whatever. Not just for work, but out with friends, with the family, etc.
I wouldn't speak to my kids as I speak to my friends (e.g. the occasional swear word and more adult topics), and I wouldn't speak to my close family as I would to my boss (e.g. moans about work and relaxed attitude) and I don't speak in the same way to my best friend and the mean neighbor. I think appearance is the same, I dress in one way at home when I'm alone, in another way if I have guests for my child birthday's party, and in another way if I'm going out for drinks. It's accomodating my desire to be perceived in a certain way plus the expectations of others. That said, in many places there is some flexibility despite what the official handbook says, specially if they have seen you. I would not change hair yet, I'd contact the person who interviewed you and ask, they might be perfectly fine with it despite whatever head office say, or don't mind red hues as opposed to green or pink. Do it via email so you can have something in writing.
I find puzzling this "I wouldn't change for a job". You don't need to change, you are who you are. But certain industries have a dressing code and if you want to work there, you need to comply or negotiate. Nobody forces you to work there. You would be required to wear a uniform in some sectors, for H&S you would be required to remove piercings (like certain NHS jobs), for some you need to tie and cover your hair back (like food preparation or surgery), for some you require safety shoes and it wouldn't matter if you build your identity around piercings, some clothing style, etc.
That said, I do think the rule is ridiculous and I think things as hair colour and tattooed shouldn't be part of a dress code. I would scrap that. But I would also relax the uniform rules for students. I would make it more like smart - casual business code and offer more choices for uniform. I know an academy that is doing that, allowing any item as long as it's black and follows a business smart casual code. Kids have lanyards with the school ID cards but nothing else has a logo. I'd scrap ties as well. Very few industries requires them in the dress code nowadays.
Anyway, I digress. I understand the rule, I think it's wrong, but I'd accept it if I wanted to work there (checking first that it would apply to me, since I passed the interview!)