title: Ionic Button with custom colors
body: <p>I’m trying to set dynamic colors for the <code>background-color</code> and <code>color</code> of an <code>ion-button</code> (Framework v4.0.0).
  What I’ve achieved so far:</p>
  
  <p><a href="https://i.stack.imgur.com/iOMuZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iOMuZ.png" alt="enter image description here"></a></p>
  
  <p>My problem: The button color overlays the button outline.
  Is this an Ionic issue, how can I get around this?</p>
  
  <p><strong>Template:</strong></p>
  
  <pre><code>&lt;ion-button *ngFor="let d of districts" shape="round"
                  (click)="districtClicked(d)"
                  [ngStyle]="getDistrictStyle(d)"
                  color="{{getDistrictColors(d)[0]}}"&gt;
          {{getDistrictName(d)}}
  &lt;/ion-button&gt;
  </code></pre>
  
  <p><strong>Method in my Component:</strong></p>
  
  <pre><code>getDistrictStyle(district: District) {
          if (district) {
              const colors = this.colorGenerator.getDistrictColors(district);
              return {
                  'background-color': colors[0],
                  'color': colors[1]
              };
          }
   }
  </code></pre>
  
  <p><code>getDistrictColors(district: District)</code> simply returns an array with two colors in hex (red and white in this case).</p>