How to check if user is in Classic or LEX in a formula field!

=IF($User.UIThemeDisplayed = "Theme4d","LEX","Classic")
(Thanks @Eloquinn)