Iran was one of the nation that didn't completely turn into a European colony during the age of colonialism.
Iran was colonized by European Greeks during Alexander's conquest of Persian empire. It was then ruled by Greek Seleucid until the Parthians took over. Then when Romans conquered part of Middle East, Emperor Trajan managed to make Persia a Roman client state which kind of like a protectorate. However later Iran was colonized by non-Europeans starting from Arabs to Turks, Mongols and other Central Asian tribes. After Safavid empire was formed, only during WWI and WWII, Russia managed to occupy northern Iran while British also took some lands of Southern Iran. However, they were not colonies but just spheres of influence. Portuguese, during the Safavid era, managed to take some Persian city on the southern coast but were driven out. Iran was also colonized by Afghans when they took over under Hotakis.
So overall, Greeks colonized Iran totally but not in Age of Colonialism.