Eye exams while pregnant

Sorry I know it's a stupid question but can you get your eyes dilated while pregnant. I know the liquid they put in my eye is yellow but just wondering if it's safe? First time mama here. Thanks in advance!