How to get the theme name programmatically in Drupal 8/9

In Drupal 8/9 use the following snippet to get the theme name programmatically.

In drush, use following command in the terminal:
drush cget system.theme default
drush cget system.theme admin
copy-icon

Comments

Authors

Read Next