Can you still dye your hair when pregnant??

Just wondering if it’s ok to still get your roots coloured when pregnant???