Change color of the Sidemenu icon

0

Good afternoon, how do I change the color of the sidemenu icon? I looked at the documentation and did some research but found nothing.

<ion-header><ion-navbarclass="navbar-amcham">
<button ion-button menuToggle>
  <ion-icon name="menu"></ion-icon>
</button>
<ion-title>AMCHAM RIO</ion-title>
</ion-navbar>
</ion-header>
    
asked by anonymous 03.09.2018 / 18:16

3 answers

1

I think in global SCSS you should do something like:

ion-header {
    ion-icon {
         color: #fc0; /*laranja*/
    }
}

On ionic 1 the file to be edited is ./scss/ionic.app.scss and in ionic3 it is the ./src/app/app.scss

    
03.09.2018 / 19:18
1

In the variables.scss file you define the color:

$colors: (
  primary:    #3e66ab,
  secondary:  #32db64,
  danger:     #dd303e,
  light:      #edeff2,
  dark:       #333333
);

And in the ion-icon tag you assign the color:

<ion-icon name="menu" color="dark"></ion-icon>
    
03.09.2018 / 19:20
1

Inside the project has the file variables.scss where you will set all the colors of your code.

$colors: (
  primary:    #488aff,
  secondary:  #32db64,
  danger:     #f53d3d,
  light:      #f4f4f4,
  dark:       #222,
  suaCor: #b13371
);

There are already some default, but just add a new one as in the above example in suaCor .

After setting the color in the file .sass you will just call it as in the example below

<button ion-button menuToggle color="suaCor">
    <ion-icon name="menu"></ion-icon>
</button>
    
03.09.2018 / 19:21