How can I programmatically get the theme name? In Drupal 8, is there a way to figure out what theme you are currently using in a module?  I need to get the name programmatically within the code of a module.
Using the theme manager is the proper Drupal 8 way of getting information about your theme.

\Drupal::service('theme.manager')-&gt;getActiveTheme()


A general rule in drupal 8 is look for the manager (/handler) service.

** Note: as Neograph734 pointed out, \Drupal::service('theme.manager')-&gt;getActiveTheme() will return the active theme object. If you want to get the theme machine-name then use \Drupal::service('theme.manager')-&gt;getActiveTheme()-&gt;getName()