I have this problem... My colour is white right now, my code is like this:
HELLO
<
Might be better to overwrite the ionic variable in your variables.scss
file
So you can create a custom color variable
$new-color:#55acee;
and then pass it into the ionic variable
$toolbar-ios-background:($new-color);
$toolbar-md-background($new-color);
$toolbar-wp-background($new-color);
you can find all the ionic variables here
There're two ways of doing this, based on if you want to change the color only in a single page, or if you want to change it in all the pages from your app:
Just like you can see here
To change the theme, just tweak the
$colors
map in yoursrc/theme/variables.scss
file:
$colors: (
// ...
newcolor: #55acee
)
And then use it in the view
<ion-header>
<ion-navbar color="newcolor">
<ion-title>
HELLO
</ion-title>
</ion-navbar>
</ion-header>
In this case, you'd need to add the following in your variables.scss
file to override Ionic's defaults:
$toolbar-ios-background: #55acee;
$toolbar-md-background: #55acee;
$toolbar-wp-background: #55acee;
Hi, how can I add gradient in app/theme/app.variables.scss?
You could add the colors that you're going to use in the src/theme/variables.scss
:
$header-first-color: #AAAAAA;
$header-last-color: #000000;
And then set a rule to use it (in your app.scss
file if you want to apply it to every page, or in the page-name.scss
file if you want to apply it to a single page):
ion-header {
.toolbar-background {
background: linear-gradient(135deg, $header-first-color 0%, $header-last-color 100%);
}
}