1.There is no way to figure out UI theme from API because Partner portal users can’t access this object.
2. By calling describe them(), looking at userUiSkin property of the returned object.
3.There is no way to figure out UI theme from API because Customer Portal users can’t access this object.
4.By calling getUserInfo(), looking at userUiSkin property of the returned object.