diff --git a/README.md b/README.md
index 070decb..690e1b8 100644
--- a/README.md
+++ b/README.md
@@ -46,11 +46,35 @@ settings page at admin/config/development/environment-indicator. In order for a
 user to change the global options, they will need the "Administer
 environment_indicator settings" permission.

+# Setting the current environment colors
+
+There are two options to set the current environment colors.
+
+## Setting environment colors through the admin UI
+
+Set the current environment on the module setting page at
+/admin/config/development/environment-indicator. Note that this
+value is saved independently per environment, so you will need
+to manually log in and set this on each environment. Note that if
+`$config['environment_indicator.indicator']['current_environment']` is
+set (see the section below), the `$config` value is used and the form
+element in the admin interface is disabled.
+
+## Setting environment colors in settings.local.php
+
 Since each copy of the site should have it's own `settings.local.php` (to store
 database credentials without checking them into version control), you must
 configure Environment Indicator by adding some configuration overrides to
 `settings.local.php`:

+ * `$config['environment_indicator.indicator']['current_environment']`:
+
+   The current environment. This value will be the machine name of an
+   environment created on the environment switcher configuration page
+   (/admin/config/development/environment-indicator/switcher). The
+   values set for that environment will be used for the toolbar. If
+   this value is set, the settings below are ignored.
+
  * `$config['environment_indicator.indicator']['bg_color']`:

    The background color for the indicator (or Toolbar). Must be a string
@@ -98,6 +122,12 @@ configure Environment Indicator by adding some configuration overrides to

 An example configuration could look like:

+```php
+$config['environment_indicator.indicator']['current_environment'] = 'dev';
+```
+
+OR
+
 ```php
 $config['environment_indicator.indicator']['bg_color'] = '#FF5555';
 $config['environment_indicator.indicator']['fg_color'] = '#555533';
diff --git a/environment_indicator.module b/environment_indicator.module
index 4d5e27e..0165f79 100644
--- a/environment_indicator.module
+++ b/environment_indicator.module
@@ -183,8 +183,27 @@ function _environment_indicator_parse_style($style) {
  * Implements hook_toolbar().
  */
 function environment_indicator_toolbar() {
-  $active_environment = \Drupal::config('environment_indicator.indicator');
-  $title = $active_environment->get('name');
+  // Set defaults.
+  $title = FALSE;
+  $bg_color = NULL;
+  $fg_color = NULL;
+
+  // Get values for the current environment if it is set.
+  if ($current_environment = \Drupal::service('environment_indicator.service')->getCurrentEnvironment()) {
+    if ($switcher = \Drupal::config('environment_indicator.switcher.' . $current_environment)) {
+      $bg_color = $switcher->get('bg_color');
+      $fg_color = $switcher->get('fg_color');
+      $title = $switcher->get('name');
+    }
+  }
+  // Legacy - get values set in settings.local.php.
+  else {
+    $active_environment = \Drupal::config('environment_indicator.indicator');
+    $bg_color = $active_environment->get('bg_color');
+    $fg_color = $active_environment->get('fg_color');
+    $title = $active_environment->get('name');
+  }
+
   $currentUser = Drupal::currentUser();
   $permission = $currentUser->hasPermission('access environment indicator');
   $items['environment_indicator'] = [
@@ -193,8 +212,8 @@ function environment_indicator_toolbar() {
       'drupalSettings' => [
         'environmentIndicator' => [
           'name' => $title ? $title : ' ',
-          'fgColor' => $active_environment->get('fg_color'),
-          'bgColor' => $active_environment->get('bg_color'),
+          'fgColor' => $fg_color,
+          'bgColor' => $bg_color,
           'addFavicon' => \Drupal::config('environment_indicator.settings')
             ->get('favicon'),
         ],
@@ -291,10 +310,11 @@ function _environment_indicator_switcher_links() {
   }
   $current = Url::fromRoute('<current>');
   $current_path = $current->toString();
+  $current_environment = \Drupal::service('environment_indicator.service')->getCurrentEnvironment();
   $environment_entities = array_filter(
     $environment_entities,
-    function (EnvironmentIndicator $entity) {
-      return $entity->status();
+    function (EnvironmentIndicator $entity) use ($current_environment) {
+      return $entity->status() && (!$current_environment || $current_environment != $entity->id());
     }
   );
   return array_map(
diff --git a/environment_indicator.services.yml b/environment_indicator.services.yml
new file mode 100644
index 0000000..c21cea1
--- /dev/null
+++ b/environment_indicator.services.yml
@@ -0,0 +1,6 @@
+services:
+  environment_indicator.service:
+    class: 'Drupal\environment_indicator\Service\EnvironmentIndicatorService'
+    arguments:
+      - '@config.factory'
+      - '@state'
diff --git a/src/Form/EnvironmentIndicatorSettingsForm.php b/src/Form/EnvironmentIndicatorSettingsForm.php
index 2031394..c0f06f0 100644
--- a/src/Form/EnvironmentIndicatorSettingsForm.php
+++ b/src/Form/EnvironmentIndicatorSettingsForm.php
@@ -2,15 +2,78 @@

 namespace Drupal\environment_indicator\Form;

+use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Form\FormInterface;
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\State\StateInterface;
+use Drupal\environment_indicator\Service\EnvironmentIndicatorServiceInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;

 /**
  * Basic Environment Indicator controls form.
  */
 class EnvironmentIndicatorSettingsForm extends ConfigFormBase implements FormInterface {

+  /**
+   * The entity type manager.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
+   */
+  protected $entityTypeManager;
+
+  /**
+   * The Drupal state service.
+   *
+   * @var Drupal\Core\State\StateInterface
+   */
+  protected $state;
+
+  /**
+   * The environment indicator service.
+   *
+   * @var \Drupal\environment_indicator\Service\EnvironmentIndicatorServiceInterface
+   */
+  protected $environmentIndicatorService;
+
+  /**
+   * Constructs an EnvironmentIndicatorSettingsForm instance.
+   *
+   * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory
+   *   The configuration factory service.
+   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
+   *   The entity type manager.
+   * @param \Drupal\Core\State\StateInterface $state
+   *   The Drupal state service.
+   * @param \Drupal\environment_indicator\Service\EnvironmentIndicatorServiceInterface $environmentIndicatorService
+   *   The environment indiator service.
+   */
+  public function __construct(
+    ConfigFactoryInterface $configFactory,
+    EntityTypeManagerInterface $entityTypeManager,
+    StateInterface $state,
+    EnvironmentIndicatorServiceInterface $environmentIndicatorService
+  ) {
+    parent::__construct($configFactory);
+
+    $this->entityTypeManager = $entityTypeManager;
+    $this->state = $state;
+    $this->environmentIndicatorService = $environmentIndicatorService;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('config.factory'),
+      $container->get('entity_type.manager'),
+      $container->get('state'),
+      $container->get('environment_indicator.service')
+    );
+  }
+
   /**
    * {@inheritdoc}
    */
@@ -39,6 +102,29 @@ class EnvironmentIndicatorSettingsForm extends ConfigFormBase implements FormInt
       '#description' => $this->t('If checked, a favicon will be added with the environment colors when the indicator is shown.'),
       '#default_value' => $config->get('favicon') ?: FALSE,
     ];
+
+    $environments = $this->entityTypeManager->getStorage('environment_indicator')->loadMultiple();
+    $options = ['' => $this->t('-- SELECT --')];
+    foreach ($environments as $environment) {
+      $options[$environment->id()] = $environment->label();
+    }
+    if (!empty($options)) {
+      // Note - can't use dependency injection here as it does not contain
+      // overriden values in settings.php, which is the specific value that
+      // needs to be checked. If this value does not exist, the value saved in
+      // the state is used instead. This is because the value in settings.php
+      // takes precedence over the value saved in state.
+      $disabled = !empty(\Drupal::config('environment_indicator.indicator')->get('current_environment'));
+      $form['current_environment'] = [
+        '#type' => 'select',
+        '#title' => $this->t('Current Environment'),
+        '#options' => $options,
+        '#default_value' => $this->environmentIndicatorService->getCurrentEnvironment(),
+        '#disabled' => $disabled,
+        '#description' => $this->t("This value is stored outside configuration, and must be set manually on each environment. Note that if <code>\$config['environment_indicator.indicator']['current_environment']</code> is set in <code>local.settings.php</code>, that value is used and this input is disabled."),
+      ];
+    }
+
     return $form;
   }

@@ -59,6 +145,14 @@ class EnvironmentIndicatorSettingsForm extends ConfigFormBase implements FormInt
       $config->set($property, $form_state->getValue($property));
     });
     $config->save();
+
+    if ($current_environment = $form_state->getValue('current_environment')) {
+      $this->state->set('evironment_indicator.current', $current_environment);
+    }
+    else {
+      $this->state->delete('evironment_indicator.current');
+    }
+
     parent::submitForm($form, $form_state);
   }

diff --git a/src/Service/EnvironmentIndicatorService.php b/src/Service/EnvironmentIndicatorService.php
new file mode 100644
index 0000000..b96ddb9
--- /dev/null
+++ b/src/Service/EnvironmentIndicatorService.php
@@ -0,0 +1,54 @@
+<?php
+
+namespace Drupal\environment_indicator\Service;
+
+use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\Core\State\StateInterface;
+
+/**
+ * Defines the service: environment_indicator.service.
+ */
+class EnvironmentIndicatorService implements EnvironmentIndicatorServiceInterface {
+
+  /**
+   * The configuration service.
+   *
+   * @var \Drupal\Core\Config\ConfigFactoryInterface
+   */
+  protected $config;
+
+  /**
+   * The Drupal state service.
+   *
+   * @var \Drupal\Core\StateInterface
+   */
+  protected $state;
+
+  /**
+   * Constructs an EnvironmentIndicatorService instances.
+   *
+   * @param \Drupal\Core\Config\ConfigFactoryInterface $config
+   *   The configuration service.
+   * @param \Drupal\Core\StateInterface $state
+   *   The Drupal state service.
+   */
+  public function __construct(
+    ConfigFactoryInterface $config,
+    StateInterface $state
+  ) {
+    $this->config = $config;
+    $this->state = $state;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCurrentEnvironment(): ?string {
+    if (!$current_domain = $this->config->get('environment_indicator.indicator')->get('current_environment')) {
+      $current_domain = $this->state->get('evironment_indicator.current');
+    }
+
+    return $current_domain;
+  }
+
+}
diff --git a/src/Service/EnvironmentIndicatorServiceInterface.php b/src/Service/EnvironmentIndicatorServiceInterface.php
new file mode 100644
index 0000000..a042ca6
--- /dev/null
+++ b/src/Service/EnvironmentIndicatorServiceInterface.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\environment_indicator\Service;
+
+/**
+ * Interface for service: environment_indicator.service.
+ */
+interface EnvironmentIndicatorServiceInterface {
+
+  /**
+   * Retrieive the machine name of the current environment switcher environment.
+   *
+   * Note that the current environment can be set in two ways:
+   *   - In settings.local.php (runtime override)
+   *   - Through the module UI at
+   *     /admin/config/development/environment-indicator
+   * Note that if the current environment is set in settings.local.php, it
+   * overrides any value saved to the Drupal state.
+   *
+   * @return string|null
+   *   The machine name of the current environment if it is set, or NULL
+   *   otherwise.
+   */
+  public function getCurrentEnvironment(): ?string;
+
+}
