I think depends on the school.
Technically, since you graduated already, they can't do anything
to you but it probably wouldn't be a good impression to leave your
teachers with.
I'm not too certain about how it is today, but when I collected
my results in the past, I didn't see anyone with coloured hair.
However, if you already dyed your hair then it will really be
kind of a waste of money and damaging to the hair to dye it black
just to collect results.