How can I programmatically get the admin theme
This is config and you can get it with the following snippet.

$admin_theme = \Drupal::config('system.theme')-&gt;get('admin');
$admin_theme_name = \Drupal::service('theme_handler')-&gt;getName($admin_theme);


Or with Drush:

drush cget system.theme admin