My hairdresser said it was best to avoid in the first 3 months. I only have highlights that don't touch your scalp so not sure if it is different if you use an all over colour? Possibly best to check with your dr just in case.
My doctor told me to avoid it during the first 12 weeks and then if you have to foils are best because they don't touch the scalp as much as an all over hair dye. I had my hair done with foils twice while I was pregnant.
Best to get an opinion from your doctor and then make an informed decision.
I had my hair coloured during pregnancy - my hair dresser used conditioning colour and took some care not to touch my scalp and used foil as well. I would avoid it if I could, but I had a lot of gray hair and its not great for work.