How to change the background color of ion-header in ionic 2?

Pawan picture Pawan · Mar 7, 2017 · Viewed 29.9k times · Source

How to change the header color? I tried below but didn't succeeded

 <ion-header>
  <ion-navbar danger>
    <ion-title>TITLE</ion-title>
  </ion-navbar>
</ion-header>

My variable.scss is:

$colors: (
  primary:    #387ef5,
  secondary:  #32db64,
  danger:     #f53d3d,
  light:      #f4f4f4,
  dark:       #222
);

Answer

Yasir picture Yasir · Mar 8, 2017

You can change it globally if you want to in your variables.scss under/in the theme folder:

$toolbar-background: blue;

For all the reference Ionic SASS Variables to override follow this link