Best avoided but...
Most hair dyes contain toxic ingredients, some of which are carcinogenic.
I'd avoid all in the 1st trimester. If you REALLY need to dye your hair after 1st trimester you can try to find a nontoxic choice but they're all toxic to some degree so if you want to have a healthy baby please wait. If you coloured your hair and your baby had problems how would you feel?