Although I'm broadly sympathetic, I think it does depend on what job you do. There are many, many jobs with tight and restrictive uniform/appearance rules for a variety of reasons, some seemingly reasonable, others less so. As others have said, if your appearance is that much at odds with the corporate "culture" you work in, then I think you are almost certainly in the wrong job. There are plenty of workplaces where an unusual appearance may be perfectly acceptable, even welcome - the fashion and creative industries spring to mind.
Is this really an issue for trade unions? Surely there are more important workplace concerns?
I don't think I'd have wanted the news about my cancer to be given to me by someone with violet hair, no matter how clean or neat. For that type of job, it shouldn't be about you - it should be about being sober and professional, and in fact probably quite dull and forgettable. Bluntly in those circumstances, violet hair just gets in the way and can (hopefully not in your case) make you look like an attention seeking teenager, rather than a serious and committed worker.
It's naive to think your hair is not sending out messages - our clothing and hair carry all sorts of messages about our gender, our sexuality, our status and our power - there are whole rafts of studies on this, and every culture will have status/gender signifiers of varying types.
I actually think the idea of a headscarf is a good one - these days, most of us are increasingly seeing these being worn in a variety of settings, not just for religious reasons but also for those going through chemo - strikes me as being a sensible way forward.