title: Dynamically change color in Ionic 2
body: <p>Based on some condition, I am trying to set the color value of an element.</p>
  
  <p>So, in my TS file, I have taken a variable called color that I am setting as</p>
  
  <pre><code>  if(this.value&gt;0) this.color="#ffc000!important";
  </code></pre>
  
  <p>In my HTML file, I have tried setting this color in the following ways</p>
  
  <pre><code>&lt;ion-icon name="notifications" [style.color]="color"&gt;
  </code></pre>
  
  <p>as well as using ngstyle</p>
  
  <pre><code>&lt;ion-icon name="notifications" [ngStyle]="{'color': color}"&gt;
  </code></pre>
  
  <p>None of these are working. What am I doing wrong or what is the right way to do this?</p>