# How to set color programmatically ion-nav-bar ion-header-bar

**URL:** <https://forum.ionicframework.com/t/how-to-set-color-programmatically-ion-nav-bar-ion-header-bar/30194>\
**Category:** ionic-v1\
**Created:** [August 10, 2015, 5:01am UTC](https://forum.ionicframework.com/t/how-to-set-color-programmatically-ion-nav-bar-ion-header-bar/30194 "2015-08-10T05:01:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![walison](https://avatars.discourse-cdn.com/v4/letter/w/e5b9ba/32.png) [@walison](https://forum.ionicframework.com/u/walison)\
**Post date:** [August 10, 2015, 5:01am UTC](https://forum.ionicframework.com/t/how-to-set-color-programmatically-ion-nav-bar-ion-header-bar/30194/1 "2015-08-10T05:01:57Z")

</div>

Hi,

In my menu.html generated by project sidemenu, i have `<ion-nav-bar class="bar-{{appColor}}">`

i want to modify this class programmatically, with this  
`<input type="radio" name="group" ng-model="appColor" value="calm">`

so, not working… ☹

```
<button class="button button-{{appColor}}">ok</button>

```

it’s works !!

---

<div class="post-metadata">

**Author:** ![Gajotres](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gajotres/32/98564_2.png) [@Gajotres](https://forum.ionicframework.com/u/Gajotres)\
**Post date:** [August 10, 2015, 9:00am UTC](https://forum.ionicframework.com/t/how-to-set-color-programmatically-ion-nav-bar-ion-header-bar/30194/2 "2015-08-10T09:00:24Z")

</div>

Please create us a working example. We can help you only if we can recreate this problem on our own.

Here you’ll find working templates: [http://www.gajotres.net/help-us-help-you-how-to-ask-a-good-ionic-forum-question/](http://www.gajotres.net/help-us-help-you-how-to-ask-a-good-ionic-forum-question/)

---

<div class="post-metadata">

**Author:** ![Eviin](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@Eviin](https://forum.ionicframework.com/u/Eviin)\
**Post date:** [August 10, 2015, 2:18pm UTC](https://forum.ionicframework.com/t/how-to-set-color-programmatically-ion-nav-bar-ion-header-bar/30194/3 "2015-08-10T14:18:49Z")

</div>

If I’ve understood you correctly then [https://github.com/Box9/jss](https://github.com/Box9/jss) should be the solution.  
With this tiny library you will be able to modify, get or even remove the actual CSS that is used by the Browser.

---

<div class="post-metadata">

**Author:** ![walison](https://avatars.discourse-cdn.com/v4/letter/w/e5b9ba/32.png) [@walison](https://forum.ionicframework.com/u/walison)\
**Post date:** [August 10, 2015, 5:58pm UTC](https://forum.ionicframework.com/t/how-to-set-color-programmatically-ion-nav-bar-ion-header-bar/30194/4 "2015-08-10T17:58:50Z")

</div>

Solution… is here…

[http://techiedreams.com/ionic-custom-and-dynamic-theming/](http://techiedreams.com/ionic-custom-and-dynamic-theming/)
