title: Dynamically change background color of mat-expansion-panel-header based on whether or not it is expanded
body: <p>I've been struggling to find a way to dynamically change the background color of a material design expansion panel header based on whether or not the panel is expanded. </p>
  
  <p>When the panel is closed I'd like the background color to be white, but when it is expanded I want to change that color to something else. I'm not seeing something I can base this change off of, maybe I'm missing something. I'm new to angular and was thinking I would just be able to base it off of [expanded]'s setting but it appears that is not the case.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>mat-accordion
  mat-expansion-panel
  mat-expansion-panel-header
  mat-expanded{
    font-size: 1.25em;
    background-color: white;
    background: white;
    color: #00838f;
    font-weight: 500;
  }
  
  
  
  mat-accordion
  mat-expansion-panel
  mat-expansion-panel-header {
    font-size: 1.25em;
    background-color: white;
    background: white;
  
    color: #00838f;
    font-weight: 500;
  }
  
  
    mat-accordion
    mat-expansion-panel
    .mat-expansion-panel-body {
    background-color: white;
    padding-top: 5px;
  }
  .mat-expansion-indicator::after {
    color: #00838f;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;mat-accordion multi="true"&gt;
  &lt;mat-expansion-panel [expanded]="selectedBenefitCategories.indexOf(cat)!=-1" [hidden]="selectedBenefitCategories.indexOf(cat)===-1"&gt;
    &lt;mat-expansion-panel-header&gt;
      &lt;i class="search-category-icon far fa-star"&gt;&lt;/i&gt; &amp;nbsp; {{cat}}
    &lt;/mat-expansion-panel-header&gt;
    &lt;ng-template matExpansionPanelContent&gt;
  
      some content
  
    &lt;/ng-template&gt;
  &lt;/mat-expansion-panel&gt;
  &lt;/mat-accordion&gt;</code></pre>
  </div>
  </div>
  </p>